File size: 3,934 Bytes
e029c99 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
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:
""" |