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 \"races\" (\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Which Circuit is on July 24?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"races\" WHERE \"date\"='july 24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What date did Delage win?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='delage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What circuit did Luigi Villoresi win the Lausanne Grand Prix?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"other_grands_prix\" WHERE \"winning_driver\"='luigi villoresi' AND \"name\"='lausanne grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Grand Prix did Nello Pagani win?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"other_grands_prix\" WHERE \"winning_driver\"='nello pagani';" } ]
[ { "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 did the home team score when playing Fitzroy as the away team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"away_team\"='fitzroy';" } ]
[ { "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 did the home team score when playing at Western Oval?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_17\" 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_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 Collingwood?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" 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_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: On what date did Collingwood play at home?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_17\" 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 \"2000_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the average round where Dave Stachelski was picked smaller than 187." }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"2000_new_england_patriots_draft_selectio\" WHERE \"overall\"<187 AND \"player\"='dave stachelski';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which position did David Nugent play with an overall small than 187?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"2000_new_england_patriots_draft_selectio\" WHERE \"overall\">187 AND \"player\"='david nugent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_new_england_patriots_draft_selectio\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the college that has an overall larger than 187 and a round smaller than 7 for the defensive end position." }, { "role": "assistant", "content": "SELECT \"college\" FROM \"2000_new_england_patriots_draft_selectio\" WHERE \"overall\">187 AND \"round\"<7 AND \"position\"='defensive end';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shutouts\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"shutouts\" real,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: Which player has less than 201 games, is ranked 2, and played between 2007-2012?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"shutouts\" WHERE \"games\"<201 AND \"rank\"=2 AND \"years\"='2007-2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"shutouts\" (\n \"rank\" real,\n \"player\" text,\n \"nation\" text,\n \"shutouts\" real,\n \"games\" real,\n \"years\" text\n);\n\nQuestion: How many average games did Nick Rimando have?" }, { "role": "assistant", "content": "SELECT AVG(\"games\") FROM \"shutouts\" WHERE \"player\"='nick rimando';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_lieutenant_governors\" (\n \"name\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"governor\" text\n);\n\nQuestion: What is the party of the politician who left office on January 12, 1857" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"list_of_lieutenant_governors\" WHERE \"left_office\"='january 12, 1857';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_lieutenant_governors\" (\n \"name\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"governor\" text\n);\n\nQuestion: What is the party of the governor under Hugh Thomas Miller." }, { "role": "assistant", "content": "SELECT \"governor\" FROM \"list_of_lieutenant_governors\" WHERE \"name\"='hugh thomas miller';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_lieutenant_governors\" (\n \"name\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"governor\" text\n);\n\nQuestion: Who left office on January 9, 1893" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"list_of_lieutenant_governors\" WHERE \"left_office\"='january 9, 1893';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_lieutenant_governors\" (\n \"name\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"governor\" text\n);\n\nQuestion: Who took office under the government of Matthew E. Welsh?" }, { "role": "assistant", "content": "SELECT \"took_office\" FROM \"list_of_lieutenant_governors\" WHERE \"governor\"='matthew e. welsh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_lieutenant_governors\" (\n \"name\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"governor\" text\n);\n\nQuestion: Which governor took office on January 13, 1877" }, { "role": "assistant", "content": "SELECT \"governor\" FROM \"list_of_lieutenant_governors\" WHERE \"took_office\"='january 13, 1877';" } ]
[ { "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 score of the Geelong away team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"away_team\"='geelong';" } ]
[ { "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 crowd for the team with a score of 10.9 (69)?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_3\" WHERE \"home_team_score\"='10.9 (69)';" } ]
[ { "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 score of the team that plays in lake oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_3\" 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_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 the date of the game of the team that plays in princes park?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_3\" 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_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 score of the home team of carlton?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_3\" 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_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: How many people watched the away team of Geelong?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_7\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 has the Brunswick Street Oval venue?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_1\" WHERE \"venue\"='brunswick street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 has the Brunswick Street Oval venue?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"venue\"='brunswick street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 Away team has an Away team score of 11.18 (84)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"away_team_score\"='11.18 (84)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\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 Away team has a Home team of Collingwood?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_1\" 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_1\" (\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 Away team has a Home score of 9.15 (69)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"home_team_score\"='9.15 (69)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"crops\" (\n \"crop_kilotonnes\" text,\n \"new_south_wales\" real,\n \"victoria\" real,\n \"queensland\" real,\n \"western_australia\" real,\n \"south_australia\" real,\n \"tasmania\" real,\n \"total\" real\n);\n\nQuestion: Which is the lowest crop total with New South Wales at 42 kilotonnes and Victorian at less than 68 kilotonnes?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"crops\" WHERE \"new_south_wales\"=42 AND \"victoria\"<68;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: Who had a qual 1 best of 1:01.704?" }, { "role": "assistant", "content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"best\"='1:01.704';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What team had a qual 1 of 1:02.755?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:02.755';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 1 for rusport and had a best of 58.665?" }, { "role": "assistant", "content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"team\"='rusport' AND \"best\"='58.665';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What team had a qual 1 of 59.895?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_1\"='59.895';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: Who had a qual 1 of 1:01.461?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:01.461';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"windows_nt\" (\n \"name\" text,\n \"architecture\" text,\n \"usb_support\" text,\n \"lfn_support\" text,\n \"ap_is\" text\n);\n\nQuestion: What is the LFN support with 32-bit architecture on Windows Home Server?" }, { "role": "assistant", "content": "SELECT \"lfn_support\" FROM \"windows_nt\" WHERE \"architecture\"='32-bit' AND \"name\"='windows home server';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"windows_nt\" (\n \"name\" text,\n \"architecture\" text,\n \"usb_support\" text,\n \"lfn_support\" text,\n \"ap_is\" text\n);\n\nQuestion: What is the LFN support on Windows NT 3.1?" }, { "role": "assistant", "content": "SELECT \"lfn_support\" FROM \"windows_nt\" WHERE \"name\"='windows nt 3.1';" } ]
[ { "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 venue has the away side scoring 15.23 (113)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" WHERE \"away_team_score\"='15.23 (113)';" } ]
[ { "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 venue features hawthorn as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_7\" 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_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: How many people attended the game with the home side scoring 11.13 (79)?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_7\" WHERE \"home_team_score\"='11.13 (79)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"swindon_town_career_details\" (\n \"season\" text,\n \"team\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"cup_apps\" real,\n \"cup_goals\" real\n);\n\nQuestion: How many cop apps in the season with fewer than 12 league apps?" }, { "role": "assistant", "content": "SELECT SUM(\"cup_apps\") FROM \"swindon_town_career_details\" WHERE \"league_apps\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"swindon_town_career_details\" (\n \"season\" text,\n \"team\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"cup_apps\" real,\n \"cup_goals\" real\n);\n\nQuestion: What season saw 6 cup apps and 5 cup goals?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"swindon_town_career_details\" WHERE \"cup_apps\"=6 AND \"cup_goals\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"swindon_town_career_details\" (\n \"season\" text,\n \"team\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"cup_apps\" real,\n \"cup_goals\" real\n);\n\nQuestion: How many league apps in the season with more than 2 cup goals and more than 6 cup apps?" }, { "role": "assistant", "content": "SELECT SUM(\"league_apps\") FROM \"swindon_town_career_details\" WHERE \"cup_goals\">2 AND \"cup_apps\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"swindon_town_career_details\" (\n \"season\" text,\n \"team\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"cup_apps\" real,\n \"cup_goals\" real\n);\n\nQuestion: How many cup goals for the season with more than 34 league apps?" }, { "role": "assistant", "content": "SELECT AVG(\"cup_goals\") FROM \"swindon_town_career_details\" WHERE \"league_apps\">34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"swindon_town_career_details\" (\n \"season\" text,\n \"team\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"cup_apps\" real,\n \"cup_goals\" real\n);\n\nQuestion: How many cup goals in the season with more than 5 league apps, 1 cup apps and fewer than 4 league goals?" }, { "role": "assistant", "content": "SELECT SUM(\"cup_goals\") FROM \"swindon_town_career_details\" WHERE \"league_apps\">5 AND \"cup_apps\"=1 AND \"league_goals\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"swindon_town_career_details\" (\n \"season\" text,\n \"team\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"cup_apps\" real,\n \"cup_goals\" real\n);\n\nQuestion: How many cup apps for the season where there are more than 10 league goals and 23 league apps?" }, { "role": "assistant", "content": "SELECT \"cup_apps\" FROM \"swindon_town_career_details\" WHERE \"league_goals\">10 AND \"league_apps\"=23;" } ]
[ { "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 route has a Date of 2 july?" }, { "role": "assistant", "content": "SELECT \"route\" FROM \"stage_results\" WHERE \"date\"='2 july';" } ]
[ { "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 length has a Stage of 9?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"stage_results\" WHERE \"stage\"='9';" } ]
[ { "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 date has a Terrain of plain stage, and a Stage of 4?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"stage_results\" WHERE \"terrain\"='plain stage' AND \"stage\"='4';" } ]
[ { "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: Who is the away team at the game at MCG with the crowd is larger than 15,500?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"crowd\">'15,500' AND \"venue\"='mcg';" } ]
[ { "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 is the score for Fitzroy when they are the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_5\" 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_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 is the date of the game at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_5\" 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_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 is the smallest crowd for a game when Melbourne is the home team?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_5\" 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 \"2009\" (\n \"player\" text,\n \"home_town\" text,\n \"college_prior\" text,\n \"drafting_team\" text,\n \"graduated\" real\n);\n\nQuestion: Who drafted the player from Michigan after 2010?" }, { "role": "assistant", "content": "SELECT \"drafting_team\" FROM \"2009\" WHERE \"graduated\">2010 AND \"college_prior\"='michigan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"player\" text,\n \"home_town\" text,\n \"college_prior\" text,\n \"drafting_team\" text,\n \"graduated\" real\n);\n\nQuestion: Where was the player from who graduated from Michigan after 2010?" }, { "role": "assistant", "content": "SELECT \"home_town\" FROM \"2009\" WHERE \"graduated\">2010 AND \"college_prior\"='michigan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"player\" text,\n \"home_town\" text,\n \"college_prior\" text,\n \"drafting_team\" text,\n \"graduated\" real\n);\n\nQuestion: From what town was Steve Zakuani?" }, { "role": "assistant", "content": "SELECT \"home_town\" FROM \"2009\" WHERE \"player\"='steve zakuani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"player\" text,\n \"home_town\" text,\n \"college_prior\" text,\n \"drafting_team\" text,\n \"graduated\" real\n);\n\nQuestion: What year did Omar Gonzalez graduate?" }, { "role": "assistant", "content": "SELECT SUM(\"graduated\") FROM \"2009\" WHERE \"player\"='omar gonzalez';" } ]
[ { "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 university hosted in Long Beach?" }, { "role": "assistant", "content": "SELECT \"host\" FROM \"first_and_second_rounds\" WHERE \"city\"='long beach';" } ]
[ { "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 is the venue that Saint Joseph's University hosted at?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"host\"='saint joseph''s 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: In which city is Hayman Hall (Tom Gola Arena) located?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"venue\"='hayman hall (tom gola arena)';" } ]
[ { "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 venue is in the city of Villanova?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"city\"='villanova';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"debutantes\" (\n \"player\" text,\n \"team\" text,\n \"date\" text,\n \"opposition\" text,\n \"game\" text\n);\n\nQuestion: On which date did Ger Loughnane from Team Clare have a match?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"debutantes\" WHERE \"team\"='clare' AND \"player\"='ger loughnane';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"debutantes\" (\n \"player\" text,\n \"team\" text,\n \"date\" text,\n \"opposition\" text,\n \"game\" text\n);\n\nQuestion: What team opposed Tipperary in the Munster Final game?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"debutantes\" WHERE \"opposition\"='tipperary' AND \"game\"='munster final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"debutantes\" (\n \"player\" text,\n \"team\" text,\n \"date\" text,\n \"opposition\" text,\n \"game\" text\n);\n\nQuestion: On what date did Limerick play in the All-Ireland Final game?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"debutantes\" WHERE \"opposition\"='limerick' AND \"game\"='all-ireland final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"debutantes\" (\n \"player\" text,\n \"team\" text,\n \"date\" text,\n \"opposition\" text,\n \"game\" text\n);\n\nQuestion: Who was the opposition in the game on July 29?" }, { "role": "assistant", "content": "SELECT \"opposition\" FROM \"debutantes\" WHERE \"date\"='july 29';" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: What day did the team play week 13?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=13;" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: What was Bye's opponent's attendance?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='bye';" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: Which opponent, before Week 10, had an attendance of 63,672?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<10 AND \"attendance\"='63,672';" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: Which week had an attendance of 70,225" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='70,225';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"incident_no\" text,\n \"date\" text,\n \"place\" text,\n \"killed\" real,\n \"injured\" real\n);\n\nQuestion: What was the highest number of people injured at incidents located at Rohtas, Bihar where fewer than 13 were killed?" }, { "role": "assistant", "content": "SELECT MAX(\"injured\") FROM \"2007\" WHERE \"place\"='rohtas, bihar' AND \"killed\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"incident_no\" text,\n \"date\" text,\n \"place\" text,\n \"killed\" real,\n \"injured\" real\n);\n\nQuestion: What was the highest number of people injured in incidents in Vaishali, Bihar?" }, { "role": "assistant", "content": "SELECT MAX(\"injured\") FROM \"2007\" WHERE \"place\"='vaishali, bihar';" } ]
[ { "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: How many points did the Away team from Geelong score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"away_team\"='geelong';" } ]
[ { "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: How many people were in the crowd at Victoria Park?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_7\" WHERE \"venue\"='victoria park';" } ]
[ { "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: How many points did the away team from Melbourne score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"away_team\"='melbourne';" } ]
[ { "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 date did the home team from Carlton play on?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_7\" 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 \"list_of_managers\" (\n \"manager\" text,\n \"nationality\" text,\n \"date_of_birth_and_age\" text,\n \"club\" text,\n \"division\" text\n);\n\nQuestion: Who is the manager of the St. Johnstone club?" }, { "role": "assistant", "content": "SELECT \"manager\" FROM \"list_of_managers\" WHERE \"club\"='st. johnstone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_managers\" (\n \"manager\" text,\n \"nationality\" text,\n \"date_of_birth_and_age\" text,\n \"club\" text,\n \"division\" text\n);\n\nQuestion: Who is the manager of the Stenhousemuir club?" }, { "role": "assistant", "content": "SELECT \"manager\" FROM \"list_of_managers\" WHERE \"club\"='stenhousemuir';" } ]
[ { "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 team was the away ream when they scored 13.12 (90)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"away_team_score\"='13.12 (90)';" } ]
[ { "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 team was home team when south Melbourne was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"away_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_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 was the away team score when the home team was Carlton?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_16\" 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 \"basins\" (\n \"basin\" text,\n \"continent\" text,\n \"drains_to\" text,\n \"basin_area_km_2\" real,\n \"basin_area_mi_2\" text\n);\n\nQuestion: What is the Basin Area mi 2 when the Basin Area km 2 is larger than 2,261,763 and the Basin is Pearl River?" }, { "role": "assistant", "content": "SELECT \"basin_area_mi_2\" FROM \"basins\" WHERE \"basin_area_km_2\">'2,261,763' AND \"basin\"='pearl river';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"basins\" (\n \"basin\" text,\n \"continent\" text,\n \"drains_to\" text,\n \"basin_area_km_2\" real,\n \"basin_area_mi_2\" text\n);\n\nQuestion: Which Basin's Continent is South America, has a Basin Area km 2 larger than 6,144,727, and a Basin Area mi 2 of 238,539?" }, { "role": "assistant", "content": "SELECT \"basin\" FROM \"basins\" WHERE \"continent\"='south america' AND \"basin_area_km_2\">'6,144,727' AND \"basin_area_mi_2\"='238,539';" } ]
[ { "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 \"attendance\" text\n);\n\nQuestion: What was date of the bye week 11?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='bye' AND \"week\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 Essendon play as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_10\" WHERE \"away_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_awards\" (\n \"year\" real,\n \"location\" text,\n \"fans_choice_award\" text,\n \"male_artist_of_the_year\" text,\n \"female_artist_of_the_year\" text,\n \"group_or_duo_of_the_year\" text\n);\n\nQuestion: Where did Carolyn Dawn Johnson win Female Artist of the Year, and Paul Brandt win Male Artist of the Year?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"major_awards\" WHERE \"female_artist_of_the_year\"='carolyn dawn johnson' AND \"male_artist_of_the_year\"='paul brandt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_awards\" (\n \"year\" real,\n \"location\" text,\n \"fans_choice_award\" text,\n \"male_artist_of_the_year\" text,\n \"female_artist_of_the_year\" text,\n \"group_or_duo_of_the_year\" text\n);\n\nQuestion: Where did Doc Walker win Group or Duo of the Year, and where did Crystal Shawanda win Female Artist of the year?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"major_awards\" WHERE \"group_or_duo_of_the_year\"='doc walker' AND \"female_artist_of_the_year\"='crystal shawanda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_awards\" (\n \"year\" real,\n \"location\" text,\n \"fans_choice_award\" text,\n \"male_artist_of_the_year\" text,\n \"female_artist_of_the_year\" text,\n \"group_or_duo_of_the_year\" text\n);\n\nQuestion: Who won Female Artist of the year in 1983, in the same city that Family Brown won Group of Duo of the year?" }, { "role": "assistant", "content": "SELECT \"female_artist_of_the_year\" FROM \"major_awards\" WHERE \"group_or_duo_of_the_year\"='family brown' AND \"year\"=1983;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"season\" real,\n \"driver\" text,\n \"team\" text,\n \"engine\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"points\" real,\n \"margin_of_defeat\" real\n);\n\nQuestion: What is the most recent season when Fernando Alonso had more than 13 podiums in a car with a Ferrari engine?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"by_season\" WHERE \"engine\"='ferrari' AND \"driver\"='fernando alonso' AND \"podiums\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tires\" text,\n \"drivers\" text\n);\n\nQuestion: What is the engine for the Bettenhausen Motorsports team?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"team\"='bettenhausen motorsports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tires\" text,\n \"drivers\" text\n);\n\nQuestion: What engine does Steve Chassey drive with a march chassis?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='march' AND \"drivers\"='steve chassey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tires\" text,\n \"drivers\" text\n);\n\nQuestion: What is the engine for the Arciero Racing team?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"team\"='arciero racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tires\" text,\n \"drivers\" text\n);\n\nQuestion: What chassis belongs with the Cosworth Engine driven by Scott Pruett on the Dick Simon Racing team?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"drivers_and_constructors\" WHERE \"engine\"='cosworth' AND \"drivers\"='scott pruett' AND \"team\"='dick simon racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tires\" text,\n \"drivers\" text\n);\n\nQuestion: What is the engine for the team of Alex Morales Motorsports?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"team\"='alex morales motorsports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tires\" text,\n \"drivers\" text\n);\n\nQuestion: What is the engine for the Machinists Union Racing team?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"team\"='machinists union racing';" } ]
[ { "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: Who is the home side when the away side score is 11.14 (80)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"away_team_score\"='11.14 (80)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\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: What was the attendance for Week 1?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"regular_season\" WHERE \"week\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\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: Which team did the Patriots play when there was a game attendance of 73,369?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"attendance\"='73,369';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\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: What date was the Week 3 game played?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"regular_season\" WHERE \"week\"=3;" } ]
[ { "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 was the highest attendance of the matches that took place at Windy Hill?" }, { "role": "assistant", "content": "SELECT MAX(\"crowd\") FROM \"round_15\" 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_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: Which team has a home field at Glenferrie Oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_15\" WHERE \"venue\"='glenferrie oval';" } ]