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 \"round_9\" (\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 footscray score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"home_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 total crowd size for the him team footscray?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='footscray';" } ]
[ { "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: What is the Home team at corio oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_10\" 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_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: What was the away team score when the crowd is larger than 22,000 and hawthorn is the home team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"crowd\">'22,000' AND \"home_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: What livery was worn on the date before 1936, with the description of Gresley RF?" }, { "role": "assistant", "content": "SELECT \"livery\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"date\"<1936 AND \"description\"='gresley rf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: Which number and name has the description Gresley RB and a date before 1937?" }, { "role": "assistant", "content": "SELECT \"number_name\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"description\"='gresley rb' AND \"date\"<1937;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_great_central_railway_locomotive\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" real\n);\n\nQuestion: Who is the owner before 1940, who had a number and name of no. 1222?" }, { "role": "assistant", "content": "SELECT \"owner_s\" FROM \"list_of_great_central_railway_locomotive\" WHERE \"date\"<1940 AND \"number_name\"='no. 1222';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stichting_academisch_rekencentrum_amster\" (\n \"number\" real,\n \"type\" text,\n \"clock\" text,\n \"scratch\" text,\n \"memory\" text,\n \"cache\" text\n);\n\nQuestion: What type has a scratch of 750 GB?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"stichting_academisch_rekencentrum_amster\" WHERE \"scratch\"='750 gb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stichting_academisch_rekencentrum_amster\" (\n \"number\" real,\n \"type\" text,\n \"clock\" text,\n \"scratch\" text,\n \"memory\" text,\n \"cache\" text\n);\n\nQuestion: What is the Cache for a Number 64 with a Memory of 24 gb qpi 5.86 gt/s?" }, { "role": "assistant", "content": "SELECT \"cache\" FROM \"stichting_academisch_rekencentrum_amster\" WHERE \"memory\"='24 gb qpi 5.86 gt/s' AND \"number\"=64;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stichting_academisch_rekencentrum_amster\" (\n \"number\" real,\n \"type\" text,\n \"clock\" text,\n \"scratch\" text,\n \"memory\" text,\n \"cache\" text\n);\n\nQuestion: What is the Memory for a Number 32 with a Clock of 2.26ghz?" }, { "role": "assistant", "content": "SELECT \"memory\" FROM \"stichting_academisch_rekencentrum_amster\" WHERE \"clock\"='2.26ghz' AND \"number\"=32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"forwards\" (\n \"player\" text,\n \"shoots\" text,\n \"position\" text,\n \"acquired\" real,\n \"place_of_birth\" text,\n \"joined_from\" text\n);\n\nQuestion: Of those acquired in 2008, where were they born?" }, { "role": "assistant", "content": "SELECT \"place_of_birth\" FROM \"forwards\" WHERE \"acquired\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"forwards\" (\n \"player\" text,\n \"shoots\" text,\n \"position\" text,\n \"acquired\" real,\n \"place_of_birth\" text,\n \"joined_from\" text\n);\n\nQuestion: What is the shooting preference of Matthew Myers, acquired in 2010?" }, { "role": "assistant", "content": "SELECT \"shoots\" FROM \"forwards\" WHERE \"acquired\"=2010 AND \"player\"='matthew myers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"forwards\" (\n \"player\" text,\n \"shoots\" text,\n \"position\" text,\n \"acquired\" real,\n \"place_of_birth\" text,\n \"joined_from\" text\n);\n\nQuestion: In what year was player Bruce Graham acquired?" }, { "role": "assistant", "content": "SELECT \"acquired\" FROM \"forwards\" WHERE \"player\"='bruce graham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"as_a_result_of_the_elections\" (\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Name th D 43 \u221a when R 51 + is r 30" }, { "role": "assistant", "content": "SELECT \"d_43\" FROM \"as_a_result_of_the_elections\" WHERE \"r_51\"='r 30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"as_a_result_of_the_elections\" (\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Name the R 53 + which has a D 42 \u221a of d 17" }, { "role": "assistant", "content": "SELECT \"r_53\" FROM \"as_a_result_of_the_elections\" WHERE \"d_42\"='d 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"as_a_result_of_the_elections\" (\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Name the D 45 O which has R 51 + of d 30" }, { "role": "assistant", "content": "SELECT \"d_45_o\" FROM \"as_a_result_of_the_elections\" WHERE \"r_51\"='d 30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"as_a_result_of_the_elections\" (\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Name the D 42 \u221a when it has D 44 \u221a of r 36 \u221a" }, { "role": "assistant", "content": "SELECT \"d_42\" FROM \"as_a_result_of_the_elections\" WHERE \"d_44\"='r 36 \u221a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"as_a_result_of_the_elections\" (\n \"d_40\" text,\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45_o\" text,\n \"d_46_o\" text,\n \"r_53\" text,\n \"r_52\" text,\n \"r_51\" text\n);\n\nQuestion: Name the D 45 O that has D 46 O of d 26" }, { "role": "assistant", "content": "SELECT \"d_45_o\" FROM \"as_a_result_of_the_elections\" WHERE \"d_46_o\"='d 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Name the least goals for goal difference of 7 and losses more than 13" }, { "role": "assistant", "content": "SELECT MIN(\"goals_against\") FROM \"final_table\" WHERE \"goal_difference\"=7 AND \"losses\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Tell me the total number of positions with goal difference more than -17 and played less than 38" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"final_table\" WHERE \"goal_difference\">-17 AND \"played\"<38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 Melbourne play as the away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" 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_13\" (\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 attendance when South Melbourne played as the home team?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_13\" 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_13\" (\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 attendance when Footscray played as the away team?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_13\" WHERE \"away_team\"='footscray';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"powlesland_and_mason\" (\n \"manufacturer\" text,\n \"type\" text,\n \"quantity\" real,\n \"p_m_nos\" text,\n \"gwr_nos\" text\n);\n\nQuestion: What is the lowest quantity for GWR Nos. 696, 779, 93 5 from the manufacturer Peckett and Sons?" }, { "role": "assistant", "content": "SELECT MIN(\"quantity\") FROM \"powlesland_and_mason\" WHERE \"manufacturer\"='peckett and sons' AND \"gwr_nos\"='696, 779, 93 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"under_construction_stadium_s\" (\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"club\" text,\n \"opening\" real\n);\n\nQuestion: What is the lowest capacity with an opening larger than 2015 in Trabzon?" }, { "role": "assistant", "content": "SELECT MIN(\"capacity\") FROM \"under_construction_stadium_s\" WHERE \"opening\">2015 AND \"city\"='trabzon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"under_construction_stadium_s\" (\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"club\" text,\n \"opening\" real\n);\n\nQuestion: What is the average opening at Stadyum Samsun with a capacity smaller than 34,658?" }, { "role": "assistant", "content": "SELECT AVG(\"opening\") FROM \"under_construction_stadium_s\" WHERE \"stadium\"='stadyum samsun' AND \"capacity\"<'34,658';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the Years for Jazz Club at Oregon State?" }, { "role": "assistant", "content": "SELECT \"years_for_jazz\" FROM \"o\" WHERE \"school_club_team\"='oregon state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player is Andre Owens in Year for Jazz?" }, { "role": "assistant", "content": "SELECT \"years_for_jazz\" FROM \"o\" WHERE \"player\"='andre owens';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the Year for Jazz club of Houston?" }, { "role": "assistant", "content": "SELECT \"years_for_jazz\" FROM \"o\" WHERE \"school_club_team\"='houston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is position does Dan O'Sullivan play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"o\" WHERE \"player\"='dan o''sullivan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position in the club team of Kansas?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"o\" WHERE \"school_club_team\"='kansas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"o\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the center position of Years for Jazz, Greg Ostertag?" }, { "role": "assistant", "content": "SELECT \"years_for_jazz\" FROM \"o\" WHERE \"position\"='center' AND \"player\"='greg ostertag';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: What is the Date for the Away team University?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_4\" WHERE \"away_team\"='university';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: What is the Home team score at junction oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_4\" 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_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Away team score when Home team score is at 5.10 (40)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_4\" WHERE \"home_team_score\"='5.10 (40)';" } ]
[ { "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 \"date\" text\n);\n\nQuestion: What Date did the Home team play in essendon?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_4\" 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 \"other_officers\" (\n \"country\" text,\n \"of_5\" text,\n \"of_4\" text,\n \"of_2\" text,\n \"of_1\" text\n);\n\nQuestion: What country has OF-1 Locotenent?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"other_officers\" WHERE \"of_1\"='locotenent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_officers\" (\n \"country\" text,\n \"of_5\" text,\n \"of_4\" text,\n \"of_2\" text,\n \"of_1\" text\n);\n\nQuestion: What country has OF-1 Locotenent?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"other_officers\" WHERE \"of_1\"='locotenent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_officers\" (\n \"country\" text,\n \"of_5\" text,\n \"of_4\" text,\n \"of_2\" text,\n \"of_1\" text\n);\n\nQuestion: Which OF-5 is in Ghana?" }, { "role": "assistant", "content": "SELECT \"of_5\" FROM \"other_officers\" WHERE \"country\"='ghana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_officers\" (\n \"country\" text,\n \"of_5\" text,\n \"of_4\" text,\n \"of_2\" text,\n \"of_1\" text\n);\n\nQuestion: What is the OF-4 of Albania?" }, { "role": "assistant", "content": "SELECT \"of_4\" FROM \"other_officers\" WHERE \"country\"='albania';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total pick numbers for the CFL team Edmonton Eskimos?" }, { "role": "assistant", "content": "SELECT SUM(\"pick_num\") FROM \"round_five\" WHERE \"cfl_team\"='edmonton eskimos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What p;layer attended Concordia College?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_five\" WHERE \"college\"='concordia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of picks for the position of OL?" }, { "role": "assistant", "content": "SELECT SUM(\"pick_num\") FROM \"round_five\" WHERE \"position\"='ol';" } ]
[ { "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: Name the highest week for result of w 38-13" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"result\"='w 38-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: I want to know the date with attendance of 35,763" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='35,763';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"series\" text,\n \"years\" text,\n \"magazine\" text,\n \"albums\" text,\n \"editor\" text\n);\n\nQuestion: Which series with a total of 27 albums did Dargaud edit?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"bibliography\" WHERE \"editor\"='dargaud' AND \"albums\"='27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bibliography\" (\n \"series\" text,\n \"years\" text,\n \"magazine\" text,\n \"albums\" text,\n \"editor\" text\n);\n\nQuestion: What years did the magazine Vaillant and Pif run?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"bibliography\" WHERE \"magazine\"='vaillant and pif';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_current_republican_governors\" (\n \"current_governor\" text,\n \"state\" text,\n \"past\" text,\n \"took_office\" real,\n \"current_term\" text\n);\n\nQuestion: What state is susana martinez from?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"list_of_current_republican_governors\" WHERE \"current_governor\"='susana martinez';" } ]
[ { "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: Which away team has a Home team score of 15.14 (104)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"home_team_score\"='15.14 (104)';" } ]
[ { "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 is the Home team score when away team is hawthorn?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_4\" 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 \"club_career_stats\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real\n);\n\nQuestion: What league is ordabasy-2 in?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"club_career_stats\" WHERE \"team\"='ordabasy-2';" } ]
[ { "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: How many people attended the game where the home team scored 10.13 (73)?" }, { "role": "assistant", "content": "SELECT AVG(\"crowd\") FROM \"round_15\" WHERE \"home_team_score\"='10.13 (73)';" } ]
[ { "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 amount of people that attended a game where the home team scored 10.13 (73)?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_15\" WHERE \"home_team_score\"='10.13 (73)';" } ]
[ { "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: On what date was Richmond hosted as the away team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_15\" 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 \"religions_by_ethnic_group_uk_census_2001\" (\n \"ethnic_group\" text,\n \"christian\" text,\n \"buddhist\" text,\n \"hindu\" text,\n \"jewish\" text,\n \"muslim\" text,\n \"sikh\" text,\n \"other\" text,\n \"no_religion\" text,\n \"not_stated\" text\n);\n\nQuestion: Tell me the Hindu with Jewish of source: uk 2001 census" }, { "role": "assistant", "content": "SELECT \"hindu\" FROM \"religions_by_ethnic_group_uk_census_2001\" WHERE \"jewish\"='source: uk 2001 census';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"religions_by_ethnic_group_uk_census_2001\" (\n \"ethnic_group\" text,\n \"christian\" text,\n \"buddhist\" text,\n \"hindu\" text,\n \"jewish\" text,\n \"muslim\" text,\n \"sikh\" text,\n \"other\" text,\n \"no_religion\" text,\n \"not_stated\" text\n);\n\nQuestion: Tell me the ethnic group for jewish of 0.47%" }, { "role": "assistant", "content": "SELECT \"ethnic_group\" FROM \"religions_by_ethnic_group_uk_census_2001\" WHERE \"jewish\"='0.47%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"religions_by_ethnic_group_uk_census_2001\" (\n \"ethnic_group\" text,\n \"christian\" text,\n \"buddhist\" text,\n \"hindu\" text,\n \"jewish\" text,\n \"muslim\" text,\n \"sikh\" text,\n \"other\" text,\n \"no_religion\" text,\n \"not_stated\" text\n);\n\nQuestion: Tell me the Hindu for ethnic group for white irish" }, { "role": "assistant", "content": "SELECT \"hindu\" FROM \"religions_by_ethnic_group_uk_census_2001\" WHERE \"ethnic_group\"='white irish';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"religions_by_ethnic_group_uk_census_2001\" (\n \"ethnic_group\" text,\n \"christian\" text,\n \"buddhist\" text,\n \"hindu\" text,\n \"jewish\" text,\n \"muslim\" text,\n \"sikh\" text,\n \"other\" text,\n \"no_religion\" text,\n \"not_stated\" text\n);\n\nQuestion: Name the ethnic group with a buddhist of 0.19%" }, { "role": "assistant", "content": "SELECT \"ethnic_group\" FROM \"religions_by_ethnic_group_uk_census_2001\" WHERE \"buddhist\"='0.19%';" } ]
[ { "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 the attendance of week 8?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=8;" } ]
[ { "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: How many points did the home score at a game that had their opponents scoring 12.16 (88)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_5\" WHERE \"away_team_score\"='12.16 (88)';" } ]
[ { "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 was the home team that had a score of 13.14 (92)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"home_team_score\"='13.14 (92)';" } ]
[ { "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 was the opponent of carlton at their home game?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_5\" 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 \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Tell me the result for 3 goals" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Name the score for november 16" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='november 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 an away team score 22.17 (149)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_13\" WHERE \"away_team_score\"='22.17 (149)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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: In what Venue was the Away Team Score 19.13 (127)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team_score\"='19.13 (127)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 Score of the Hawthorn Home Team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"home_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 Score of the Collingwood Home Team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"away_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\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's venue is Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_13\" 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 \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Name the least Laps for accident and gird more than 13" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"time_retired\"='accident' AND \"grid\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the lowest Grid for engine and driver of emerson fittipaldi with more laps than 70" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"time_retired\"='engine' AND \"driver\"='emerson fittipaldi' AND \"laps\">70;" } ]
[ { "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 the score when Richmond played at home and the crowd was larger than 15,184?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"crowd\">'15,184' AND \"home_team\"='richmond';" } ]
[ { "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: In what venue was the away team South Melbourne?" }, { "role": "assistant", "content": "SELECT \"venue\" 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_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: Where did the away team Carlton play?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_12\" 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_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 home team played against Richmond?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_12\" 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_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 smallest crowd size for punt road oval?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_12\" WHERE \"venue\"='punt road oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\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 a home team score 23.20 (158)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_22\" WHERE \"home_team_score\"='23.20 (158)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_22\" (\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 scored 11.17 (83) while away?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_22\" WHERE \"away_team_score\"='11.17 (83)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"village_german\" text,\n \"village_slovenian\" text,\n \"number_of_people_1991\" real,\n \"percent_of_slovenes_1991\" text,\n \"percent_of_slovenes_1951\" text\n);\n\nQuestion: Which Number of people 1991 has a Percent of Slovenes 1991 of 14.4%?" }, { "role": "assistant", "content": "SELECT MAX(\"number_of_people_1991\") FROM \"references\" WHERE \"percent_of_slovenes_1991\"='14.4%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"village_german\" text,\n \"village_slovenian\" text,\n \"number_of_people_1991\" real,\n \"percent_of_slovenes_1991\" text,\n \"percent_of_slovenes_1951\" text\n);\n\nQuestion: Which Percent of Slovenes 1951 has a Number of people 1991 larger than 8, and a Village (German) of pl\u00f6schenberg?" }, { "role": "assistant", "content": "SELECT \"percent_of_slovenes_1951\" FROM \"references\" WHERE \"number_of_people_1991\">8 AND \"village_german\"='pl\u00f6schenberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 was Collingwood's away game played?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_14\" WHERE \"away_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 in the game that the away team scored 10.17 (77)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_14\" WHERE \"away_team_score\"='10.17 (77)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 at Western Oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_14\" 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_14\" (\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 did Collingwood play an away game?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_14\" WHERE \"away_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 that the Away team scored 10.17 (77) points in?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_14\" WHERE \"away_team_score\"='10.17 (77)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 was the game played when the home team score was 11.9 (75)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_14\" WHERE \"home_team_score\"='11.9 (75)';" } ]
[ { "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 team is based at junction oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" 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_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 team set at junction oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" 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_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 home team that scored 20.21 (141)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"home_team_score\"='20.21 (141)';" } ]
[ { "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: How big was the crowd in a game that had the home team score 18.19 (127)?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_3\" WHERE \"home_team_score\"='18.19 (127)';" } ]
[ { "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 place that had the home team score 16.19 (115)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_3\" WHERE \"home_team_score\"='16.19 (115)';" } ]
[ { "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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What driver has a grid under 12 with a Time/Retired of + 3 laps?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"<12 AND \"time_retired\"='+ 3 laps';" } ]
[ { "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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the high grid for osella - alfa romeo, and a Laps larger than 61?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"constructor\"='osella - alfa romeo' AND \"laps\">61;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985_nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: How many picks does Matt Moran have altogether after round 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"1985_nfl_draft\" WHERE \"name\"='matt moran' AND \"round\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985_nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What position after round 8 has a pick less than 270?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"1985_nfl_draft\" WHERE \"round\">8 AND \"pick\"<270;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985_nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the total number of rounds that UCLA has?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"1985_nfl_draft\" WHERE \"school\"='ucla';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985_nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the lowest round for Georgia Tech?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"1985_nfl_draft\" WHERE \"school\"='georgia tech';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985_nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the average round for Georgia Tech with a pick greater than 103?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"1985_nfl_draft\" WHERE \"school\"='georgia tech' AND \"pick\">103;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_basketball_players_and_coaches_of_\" (\n \"year\" text,\n \"player\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Which player is featured for 2001-2002?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"girls_basketball_players_and_coaches_of_\" WHERE \"year\"='2001-2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls_basketball_players_and_coaches_of_\" (\n \"year\" text,\n \"player\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Which player is from Queens, NY?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"girls_basketball_players_and_coaches_of_\" WHERE \"hometown\"='queens, ny';" } ]