chat_prompt
stringlengths
438
1.53k
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"kickoff\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: When was the kickoff time of the SB XXXVI?" }, { "role": "assistant", "content": "SELECT \"kickoff\" FROM \"schedule\" WHERE \"week\"='sb xxxvi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score for the game played at Princes Park?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_5\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"master_world_records\" (\n \"pool\" text,\n \"age_group\" text,\n \"time\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What event had a time of 6:37.73?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"master_world_records\" WHERE \"time\"='6:37.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"master_world_records\" (\n \"pool\" text,\n \"age_group\" text,\n \"time\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What is the time for the 50m breaststroke?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"master_world_records\" WHERE \"event\"='50m breaststroke';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"master_world_records\" (\n \"pool\" text,\n \"age_group\" text,\n \"time\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What age group has a time of 6:37.73 at the 200m breaststroke?" }, { "role": "assistant", "content": "SELECT \"age_group\" FROM \"master_world_records\" WHERE \"event\"='200m breaststroke' AND \"time\"='6:37.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"master_world_records\" (\n \"pool\" text,\n \"age_group\" text,\n \"time\" text,\n \"event\" text,\n \"date\" text\n);\n\nQuestion: What date did the 90-94 year old have a tie of 1:25.91 at the LC pool?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"master_world_records\" WHERE \"age_group\"='90-94' AND \"pool\"='lc' AND \"time\"='1:25.91';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"ppg_avg\" real,\n \"total_points\" real\n);\n\nQuestion: How many point totals are there that rank higher than 9 and have a PPG avg higher than 13.4?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_points\") FROM \"points\" WHERE \"rank\">9 AND \"ppg_avg\">13.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"ppg_avg\" real,\n \"total_points\" real\n);\n\nQuestion: How many players played over 125 games and were named david gonzalvez?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"points\" WHERE \"games\">125 AND \"player\"='david gonzalvez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Which host university is based in Missoula?" }, { "role": "assistant", "content": "SELECT \"host\" FROM \"first_and_second_rounds\" WHERE \"city\"='missoula';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What state is the city of Ruston in?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"first_and_second_rounds\" WHERE \"city\"='ruston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Which mideast regional state contains the city of Seattle?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"first_and_second_rounds\" WHERE \"region\"='mideast' AND \"city\"='seattle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Which region does Old Dominion University represent?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"first_and_second_rounds\" WHERE \"host\"='old dominion university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Which state is University of Tennessee based in?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"first_and_second_rounds\" WHERE \"host\"='university of tennessee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What was the grid for Bruno Junqueira for Dale Coyne Racing?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"race\" WHERE \"team\"='dale coyne racing' AND \"driver\"='bruno junqueira';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What were the highest points for less than 78 laps and on grid 5?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"race\" WHERE \"grid\"=5 AND \"laps\"<78;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many were in the crowd at the Junction Oval venue?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_6\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team score in the game at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date of the Arden Street Oval game?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_6\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team's score during the match where the crowd was larger than 25,819 and the home team scored 14.10 (94)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"crowd\">'25,819' AND \"home_team_score\"='14.10 (94)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the sum of all the crowds at matches where the away team's score was 7.6 (48)?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"round_3\" WHERE \"away_team_score\"='7.6 (48)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue saw a crowd larger than 29,840?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_3\" WHERE \"crowd\">'29,840';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: When does week 11 start?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which week starts on December 28, 1997?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"date\"='december 28, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: When does week 1 start?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Who one in the Tampa Bay Buccaneers?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='tampa bay buccaneers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which week starts on November 23, 1997?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"date\"='november 23, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team that scored 8.15 (63)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"home_team_score\"='8.15 (63)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the away team when the home team was Fitzroy?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"home_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Melbourne's score when they were the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"home_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the date of the game where Collingwood was the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_6\" WHERE \"home_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who watches North Melbourne when they are away?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_4\" WHERE \"away_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What Away team is visiting Carlton?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team has Windy Hill as their home venue" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"venue\"='windy hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When richmond played away, what was the largest number of people who watched?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_4\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"rank\" real,\n \"stadium\" text,\n \"capacity\" text,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Which country is ranked higher than 68, with a city named Santa Fe and a stadium that has a capacity of 32,000?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"list\" WHERE \"rank\">68 AND \"capacity\"='32,000' AND \"city\"='santa fe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"rank\" real,\n \"stadium\" text,\n \"capacity\" text,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: What is the capacity of the stadium with a rank lower than 31 located in the city of Bel\u00e9m ?" }, { "role": "assistant", "content": "SELECT \"capacity\" FROM \"list\" WHERE \"rank\"<31 AND \"city\"='bel\u00e9m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the sum of week(s) with an attendance of 30,751?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"exhibition_schedule\" WHERE \"attendance\"='30,751';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date did the home team Essendon play?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_11\" WHERE \"home_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was South Melbourne's home team score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_11\" WHERE \"home_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date was the venue of Glenferrie Oval?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_11\" WHERE \"venue\"='glenferrie oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score for the away team when the home team scored 10.11 (71)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"home_team_score\"='10.11 (71)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score for the away team when they played collingwood?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"home_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score when essendon was the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"home_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the date of the game where Richmond was the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_7\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team when Carlton was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team played against Hawthorn?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"away_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date did the Geelong team play on as a home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_18\" WHERE \"home_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school/club team did the player who was drafted after round 13 with an overall rank of 384 play for?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"nfl_draft\" WHERE \"round\">13 AND \"overall\"=384;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the largest overall rank for a center drafted before round 10?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"nfl_draft\" WHERE \"position\"='center' AND \"round\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position does the player from Texas State who was drafted before round 11 with an overall rank lower than 306 play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"overall\"<306 AND \"round\"<11 AND \"school_club_team\"='texas state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the average overall rank of all players drafted from Duke after round 9?" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"nfl_draft\" WHERE \"school_club_team\"='duke' AND \"round\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the sum of all rounds where a Tennessee State player with an overall rank less than 261 was drafted?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"nfl_draft\" WHERE \"school_club_team\"='tennessee state' AND \"overall\"<261;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the highest overall rank of any Tennessee State player drafted before round 10?" }, { "role": "assistant", "content": "SELECT MIN(\"overall\") FROM \"nfl_draft\" WHERE \"school_club_team\"='tennessee state' AND \"round\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many rounds did Blane Smith play linebacker?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"nfl_draft\" WHERE \"position\"='linebacker' AND \"player\"='blane smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many times was Arizona the team and the round was bigger than 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"nfl_draft\" WHERE \"school_club_team\"='arizona' AND \"round\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result of the game after week 5 against the st. louis rams?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">5 AND \"opponent\"='st. louis rams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What day did they play on week 4?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest crowd at princes park?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_2\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day is north melbourne the away side?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_2\" WHERE \"away_team\"='north melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day is essendon the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_2\" WHERE \"home_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away side scores 11.10 (76)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"away_team_score\"='11.10 (76)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"assist\" real,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: How many games had an assist number greater than 54?" }, { "role": "assistant", "content": "SELECT SUM(\"games\") FROM \"assists\" WHERE \"assist\">54;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"assist\" real,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: Which years did the USA have a rank lower than 6 and an assist number less than 26?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"assists\" WHERE \"assist\"<26 AND \"rank\"<6 AND \"nation\"='usa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"assist\" real,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: Which year or years did a team win 174 games and had an assist number less than 17?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"assists\" WHERE \"assist\"<17 AND \"games\"=174;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senators_at_the_beginning_of_the_39th_pa\" (\n \"name\" text,\n \"party\" text,\n \"province_division\" text,\n \"date_appointed\" text,\n \"appointed_by\" text,\n \"left_office\" text\n);\n\nQuestion: Which party does Claudette Tardif belong to?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"senators_at_the_beginning_of_the_39th_pa\" WHERE \"name\"='claudette tardif';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senators_at_the_beginning_of_the_39th_pa\" (\n \"name\" text,\n \"party\" text,\n \"province_division\" text,\n \"date_appointed\" text,\n \"appointed_by\" text,\n \"left_office\" text\n);\n\nQuestion: Who appointed the conservative from Ontario on June 18, 1993?" }, { "role": "assistant", "content": "SELECT \"appointed_by\" FROM \"senators_at_the_beginning_of_the_39th_pa\" WHERE \"party\"='conservative' AND \"province_division\"='ontario' AND \"date_appointed\"='june 18, 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"sportsperson\" text,\n \"nationality\" text,\n \"team\" text,\n \"competition_federation_or_league\" text,\n \"sport\" text\n);\n\nQuestion: What competition, federation, or league are the Tennessee Titans a member of?" }, { "role": "assistant", "content": "SELECT \"competition_federation_or_league\" FROM \"list_of_winners\" WHERE \"team\"='tennessee titans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"sportsperson\" text,\n \"nationality\" text,\n \"team\" text,\n \"competition_federation_or_league\" text,\n \"sport\" text\n);\n\nQuestion: How many years has the winner been a member of the National Football League?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"list_of_winners\" WHERE \"competition_federation_or_league\"='national football league';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"sportsperson\" text,\n \"nationality\" text,\n \"team\" text,\n \"competition_federation_or_league\" text,\n \"sport\" text\n);\n\nQuestion: Post 1994, who are the winners of Sportsperson from the National Basketball Association?" }, { "role": "assistant", "content": "SELECT \"sportsperson\" FROM \"list_of_winners\" WHERE \"year\">1994 AND \"competition_federation_or_league\"='national basketball association';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day is south melbourne at home?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_15\" WHERE \"home_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the lowest crowd at corio oval?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_15\" WHERE \"venue\"='corio oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features carlton as an away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_15\" WHERE \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team's score when the home team scores 7.8 (50)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"home_team_score\"='7.8 (50)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day does the team play at western oval?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_16\" WHERE \"venue\"='western oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features collingwood as the home side?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_16\" WHERE \"home_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team's score when the home side scores 12.13 (85)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"home_team_score\"='12.13 (85)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance of week 1" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"exhibition_schedule\" WHERE \"week\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"week_5\" (\n \"couple\" text,\n \"score\" text,\n \"dance\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: What is the Result for Couple Kelly & Alec when they have a Score of 22 (8, 7, 7)?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"week_5\" WHERE \"couple\"='kelly & alec' AND \"score\"='22 (8, 7, 7)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"week_5\" (\n \"couple\" text,\n \"score\" text,\n \"dance\" text,\n \"music\" text,\n \"result\" text\n);\n\nQuestion: What is the Music for the Dance that Scored 25 (9, 8, 8) and a Result of bottom 2?" }, { "role": "assistant", "content": "SELECT \"music\" FROM \"week_5\" WHERE \"score\"='25 (9, 8, 8)' AND \"result\"='bottom 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: How many totals are there for players with an average under 8 and less than 4 matches?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"season\" WHERE \"average\"<8 AND \"matches\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: What is the highest rank for championships with christy heffernan with over 4 matches?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"season\" WHERE \"player\"='christy heffernan' AND \"matches\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the date of the game at Junction Oval?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_12\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team score at Windy Hill?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"venue\"='windy hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did St Kilda play as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away team played at Glenferrie Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"venue\"='glenferrie oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people attended the game at Lake Oval?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_17\" WHERE \"venue\"='lake oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What home team played at Lake Oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_17\" WHERE \"venue\"='lake oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"route\" text,\n \"terrain\" text,\n \"length\" text,\n \"winner\" text\n);\n\nQuestion: What was the terrain for stage 10 of the tour?" }, { "role": "assistant", "content": "SELECT \"terrain\" FROM \"stage_results\" WHERE \"stage\"='10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"route\" text,\n \"terrain\" text,\n \"length\" text,\n \"winner\" text\n);\n\nQuestion: Which stage took the tour through Boulogne-Billancourt?" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"stage_results\" WHERE \"route\"='boulogne-billancourt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"route\" text,\n \"terrain\" text,\n \"length\" text,\n \"winner\" text\n);\n\nQuestion: Who won at stage 22?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"stage\"='22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"route\" text,\n \"terrain\" text,\n \"length\" text,\n \"winner\" text\n);\n\nQuestion: Who was the winner of stage 12?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"stage\"='12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: When was the Hon Ian Causley first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"see_also\" WHERE \"member\"='hon ian causley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: When was Jill Hall of the Labor Party first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"see_also\" WHERE \"party\"='labor' AND \"member\"='jill hall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: What state is Tanya Plibersek from?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"see_also\" WHERE \"member\"='tanya plibersek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_with_100_appearances_or_more\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"games\" real,\n \"goals\" real,\n \"years\" text\n);\n\nQuestion: What is the smallest number of goals for the player from 2008-present named tony beltran, ranked lower than 7?" }, { "role": "assistant", "content": "SELECT MIN(\"goals\") FROM \"players_with_100_appearances_or_more\" WHERE \"years\"='2008-present' AND \"player\"='tony beltran' AND \"rank\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_with_100_appearances_or_more\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"games\" real,\n \"goals\" real,\n \"years\" text\n);\n\nQuestion: What is the smallest number of goals for andy williams?" }, { "role": "assistant", "content": "SELECT MIN(\"goals\") FROM \"players_with_100_appearances_or_more\" WHERE \"player\"='andy williams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_with_100_appearances_or_more\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"games\" real,\n \"goals\" real,\n \"years\" text\n);\n\nQuestion: What is the highest number of goals for robbie findley ranked above 10?" }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"players_with_100_appearances_or_more\" WHERE \"player\"='robbie findley' AND \"rank\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"windows_nt\" (\n \"fat16\" text,\n \"fat32\" text,\n \"hpfs\" text,\n \"iso_9660\" text,\n \"ntfs\" text,\n \"re_fs\" text\n);\n\nQuestion: Which NTFS has a yes for FAT32 and a no for ReFS?" }, { "role": "assistant", "content": "SELECT \"ntfs\" FROM \"windows_nt\" WHERE \"fat32\"='yes' AND \"re_fs\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"windows_nt\" (\n \"fat16\" text,\n \"fat32\" text,\n \"hpfs\" text,\n \"iso_9660\" text,\n \"ntfs\" text,\n \"re_fs\" text\n);\n\nQuestion: Which HPFS has a no for ReFS?" }, { "role": "assistant", "content": "SELECT \"hpfs\" FROM \"windows_nt\" WHERE \"re_fs\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"windows_nt\" (\n \"fat16\" text,\n \"fat32\" text,\n \"hpfs\" text,\n \"iso_9660\" text,\n \"ntfs\" text,\n \"re_fs\" text\n);\n\nQuestion: Which FAT32 has yes v1.0/v1.1 for NTFS?" }, { "role": "assistant", "content": "SELECT \"fat32\" FROM \"windows_nt\" WHERE \"ntfs\"='yes v1.0/v1.1';" } ]