|
input_text = """You are an assistant that given natural language queries tells me which tables |
|
are relevant to the query. Here is the schema of the tables of the database. |
|
|
|
Table "team" |
|
Stores information about NBA teams. |
|
Table "team" |
|
identifier for the team, |
|
full official name of the team ("Los Angeles Lakers"), |
|
shortened team name ("LAL"), |
|
nickname for the team ("Lakers"), |
|
city where the team is based, |
|
state where the team is located, |
|
year the team was established |
|
); |
|
|
|
Table "game" |
|
season identifier, formatted as "2YYYY" ("21970" for the 1970 season) |
|
identifier of the home team, |
|
abbreviation of the home team, |
|
full name of the home team, |
|
unique identifier for the game, |
|
date the game was played (YYYY-MM-DD), |
|
"W" if the home team won, "L" if they lost, |
|
total minutes played in the game, |
|
field goals made by the home team, |
|
field goals attempted by the home team, |
|
field goal percentage of the home team, |
|
three-point field goals made by the home team, |
|
three-point attempts by the home team, |
|
three-point field goal percentage of the home team, |
|
free throws made by the home team, |
|
free throws attempted by the home team, |
|
free throw percentage of the home team, |
|
offensive rebounds by the home team, |
|
defensive rebounds by the home team, |
|
total rebounds by the home team, |
|
assists by the home team, |
|
steals by the home team, |
|
blocks by the home team, |
|
turnovers by the home team, |
|
personal fouls by the home team,, |
|
total points scored by the home team, |
|
plus/minus rating for the home team, |
|
iD of the away team, |
|
abbreviation of the away team, |
|
full name of the away team, |
|
matchup details from the away team’s perspective, |
|
"W" if the away team won, "L" if they lost, |
|
field goals made by the away team, |
|
field goals attempted by the away team, |
|
field goal percentage of the away team, |
|
three-point field goals made by the away team, |
|
three-point attempts by the away team, |
|
three-point field goal percentage of the away team, |
|
free throws made by the away team, |
|
free throws attempted by the away team, |
|
free throw percentage of the away team, |
|
offensive rebounds by the away team, |
|
defensive rebounds by the away team, |
|
total rebounds by the away team, |
|
assists by the away team, |
|
steals by the away team, |
|
blocks by the away team, |
|
turnovers by the away team, |
|
personal fouls by the away team, |
|
total points scored by the away team, |
|
plus/minus rating for the away team, |
|
indicates whether video is available (1 = Yes, 0 = No), |
|
regular season or playoffs, |
|
); |
|
|
|
Table "other_stats" |
|
Stores additional statistics, linked to the game table via game_id. |
|
CREATE TABLE IF NOT EXISTS "other_stats" ( |
|
unique game identifier, matches id column from game table |
|
league identifier |
|
home team identifier |
|
home team abbreviation |
|
home team city |
|
points in the paint by the home team |
|
second chance points by the home team |
|
fast break points by the home team |
|
largest lead by the home team |
|
number of lead changes |
|
number of times the score was tied |
|
home team turnovers |
|
total turnovers by the home team |
|
home team rebounds |
|
points off turnovers by the home team |
|
away team identifier |
|
away team abbreviation |
|
points in the paint by the away team |
|
second chance points by the away team |
|
fast break points by the away team |
|
largest lead by the away team |
|
away team turnovers |
|
total turnovers by the away team |
|
away team rebounds |
|
points off turnovers by the away team |
|
); |
|
|
|
|
|
Generate only the names of the table that are necessary to answer the natural language query, separated by commas, do not output an explanation. |
|
|
|
for example, |
|
Response: |
|
"What is the most points the Los Angeles Lakers have ever scored at home?" |
|
Response: |
|
game |
|
|
|
Response: |
|
"Which teams are located in the state of California?" |
|
SQLite: |
|
team |
|
|
|
Request: |
|
"Which team had the highest number of team turnovers in an away game?" |
|
Response: |
|
other_stats |
|
|
|
Request: |
|
"What was the average number of fastbreak points scored by the Los Angeles Lakers in home wins during the 2020 season?" |
|
Response: |
|
game, other_stats |
|
|
|
Here is the request: |
|
""" |