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 \"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 race did Meo Constantini win at the circuit of monza ?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"other_grands_prix\" WHERE \"winning_driver\"='meo constantini' AND \"circuit\"='monza';" } ]
[ { "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: On what date did Aymo Maggi win the Rome Grand Prix ?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"other_grands_prix\" WHERE \"winning_driver\"='aymo maggi' AND \"name\"='rome grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: Name the season outcome for smyrna" }, { "role": "assistant", "content": "SELECT \"season_outcome\" FROM \"2011_regular_season_football_standings\" WHERE \"school\"='smyrna';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: Name the school for eagles" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"2011_regular_season_football_standings\" WHERE \"team\"='eagles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: Name the school for Season Outcome of loss in first round of div. i playoffs" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"2011_regular_season_football_standings\" WHERE \"season_outcome\"='loss in first round of div. i playoffs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: Name the division record for riders" }, { "role": "assistant", "content": "SELECT \"division_record\" FROM \"2011_regular_season_football_standings\" WHERE \"team\"='riders';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: Name the team for school of milford" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"2011_regular_season_football_standings\" WHERE \"school\"='milford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the average points for chassis of stevens and year less than 1950" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='stevens' AND \"year\"<1950;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the least points for chassis of kurtis kraft 500a" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='kurtis kraft 500a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the total number of year for chassis of kurtis kraft 4000 and points more than 2" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='kurtis kraft 4000' AND \"points\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_season\" (\n \"week\" real,\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the visiting team on weeks under 12 and at Sports Authority Field at Mile High?" }, { "role": "assistant", "content": "SELECT \"visiting_team\" FROM \"2011_season\" WHERE \"week\"<12 AND \"stadium\"='sports authority field at mile high';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_season\" (\n \"week\" real,\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the visiting team at Raymond James Stadium?" }, { "role": "assistant", "content": "SELECT \"visiting_team\" FROM \"2011_season\" WHERE \"stadium\"='raymond james stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_season\" (\n \"week\" real,\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What date had the Houston Texans as visitors?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2011_season\" WHERE \"visiting_team\"='houston texans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_in_minnesota_state_elections\" (\n \"year\" real,\n \"office\" text,\n \"candidate\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: Name the year with percentage of 9.66%" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"results_in_minnesota_state_elections\" WHERE \"percentage\"='9.66%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_in_minnesota_state_elections\" (\n \"year\" real,\n \"office\" text,\n \"candidate\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: Name the total number of popular votes for mn attorney general in 1994" }, { "role": "assistant", "content": "SELECT COUNT(\"popular_votes\") FROM \"results_in_minnesota_state_elections\" WHERE \"office\"='mn attorney general' AND \"year\"=1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_in_minnesota_state_elections\" (\n \"year\" real,\n \"office\" text,\n \"candidate\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: Name the average popular votes in years after 1990 with percentage of 4.94%" }, { "role": "assistant", "content": "SELECT AVG(\"popular_votes\") FROM \"results_in_minnesota_state_elections\" WHERE \"percentage\"='4.94%' AND \"year\">1990;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_in_minnesota_state_elections\" (\n \"year\" real,\n \"office\" text,\n \"candidate\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: Name the least popular votes for year less than 1994 and percentage of 0.96%" }, { "role": "assistant", "content": "SELECT MIN(\"popular_votes\") FROM \"results_in_minnesota_state_elections\" WHERE \"year\"<1994 AND \"percentage\"='0.96%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What United States player holds the place of t8?`" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round\" WHERE \"place\"='t8' AND \"country\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What country of argentina has the To par of 68?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"=68 AND \"country\"='argentina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the To par and holds the t8 place of the United States player Tiger Woods?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"country\"='united states' AND \"place\"='t8' AND \"player\"='tiger woods';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What country does miguel \u00e1ngel jim\u00e9nez player for and has a score of 69?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\"=69 AND \"player\"='miguel \u00e1ngel jim\u00e9nez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"racelines\" (\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"purse\" text,\n \"finish\" text,\n \"time\" text,\n \"last_1_4\" real,\n \"odds\" text,\n \"driver\" text,\n \"trainer\" text\n);\n\nQuestion: What is the date of the race at Truro?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"racelines\" WHERE \"track\"='truro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which Year has a nominated outstanding actor in a musical?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"1998_broadway_revival\" WHERE \"result\"='nominated' AND \"category\"='outstanding actor in a musical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which Award has a nominated, and outstanding choreography?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"1998_broadway_revival\" WHERE \"result\"='nominated' AND \"category\"='outstanding choreography';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_broadway_revival\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which Award has best performance by a leading actor in a musical" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"1998_broadway_revival\" WHERE \"category\"='best performance by a leading actor in a musical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_with_100_or_more_competitive_app\" (\n \"name\" text,\n \"position\" text,\n \"club_career\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"total_apps\" real,\n \"total_goals\" real\n);\n\nQuestion: What was the club career for players in positions of DF, fewer than 18 total goals, fewer than 129 league appearances, and more than 7 league goals?" }, { "role": "assistant", "content": "SELECT \"club_career\" FROM \"players_with_100_or_more_competitive_app\" WHERE \"position\"='df' AND \"total_goals\"<18 AND \"league_apps\"<129 AND \"league_goals\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_with_100_or_more_competitive_app\" (\n \"name\" text,\n \"position\" text,\n \"club_career\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"total_apps\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the fewest total goals scored for players with under 171 league appearances, 151 total appearances, and the DF position?" }, { "role": "assistant", "content": "SELECT MIN(\"total_goals\") FROM \"players_with_100_or_more_competitive_app\" WHERE \"league_apps\"<171 AND \"total_apps\"=151 AND \"position\"='df';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"group\" text,\n \"award\" text,\n \"film_show\" text,\n \"result\" text\n);\n\nQuestion: What is the total number of Years that has the Group, Method Fest Independent Film Festival?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"awards_and_nominations\" WHERE \"group\"='method fest independent film festival';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"group\" text,\n \"award\" text,\n \"film_show\" text,\n \"result\" text\n);\n\nQuestion: What is the average Year that has the Group, Logie Award, the Award, Most Outstanding Actor, and the Result, nominated?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"awards_and_nominations\" WHERE \"group\"='logie award' AND \"award\"='most outstanding actor' AND \"result\"='nominated';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"group\" text,\n \"award\" text,\n \"film_show\" text,\n \"result\" text\n);\n\nQuestion: Before 2012, which Group has the Result, nominated, the Film/Show, East West 101, and the Award, Best Lead Actor in A Television Drama?" }, { "role": "assistant", "content": "SELECT \"group\" FROM \"awards_and_nominations\" WHERE \"result\"='nominated' AND \"year\"<2012 AND \"film_show\"='east west 101' AND \"award\"='best lead actor in a television drama';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"group\" text,\n \"award\" text,\n \"film_show\" text,\n \"result\" text\n);\n\nQuestion: After 2008, which Group has the Result, nominated, and the Award, Best Lead Actor in a Television Drama?" }, { "role": "assistant", "content": "SELECT \"group\" FROM \"awards_and_nominations\" WHERE \"result\"='nominated' AND \"year\">2008 AND \"award\"='best lead actor in a television drama';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"group\" text,\n \"award\" text,\n \"film_show\" text,\n \"result\" text\n);\n\nQuestion: What is the Award, when the Film/Show is East West 101, and when the year is before 2009, and when the Group is Logie Award?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"film_show\"='east west 101' AND \"year\"<2009 AND \"group\"='logie award';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"group\" text,\n \"award\" text,\n \"film_show\" text,\n \"result\" text\n);\n\nQuestion: What is the Film/Show, when the Year is 2010?" }, { "role": "assistant", "content": "SELECT \"film_show\" FROM \"awards_and_nominations\" WHERE \"year\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which year is that has a Entrant of belond equa-flow / calif. muffler?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='belond equa-flow / calif. muffler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: which election year has henry wyndham as the 2nd member and walter barttelot as 1st member?" }, { "role": "assistant", "content": "SELECT \"election\" FROM \"members_of_parliament\" WHERE \"2nd_member\"='henry wyndham' AND \"1st_member\"='walter barttelot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: what election year has 2nd party conservative with 2nd member henry wyndham and 1st member walter barttelot?" }, { "role": "assistant", "content": "SELECT \"election\" FROM \"members_of_parliament\" WHERE \"2nd_party\"='conservative' AND \"2nd_member\"='henry wyndham' AND \"1st_member\"='walter barttelot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: what is the 1st pary when the second is whig?" }, { "role": "assistant", "content": "SELECT \"1st_party\" FROM \"members_of_parliament\" WHERE \"2nd_party\"='whig';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: what is the election year with henry wyndham as 2nd member and walter barttelot as 1st?" }, { "role": "assistant", "content": "SELECT \"election\" FROM \"members_of_parliament\" WHERE \"2nd_member\"='henry wyndham' AND \"1st_member\"='walter barttelot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"twenty20_internationals\" (\n \"player\" text,\n \"wkts\" real,\n \"runs\" real,\n \"econ\" real,\n \"ovrs\" real\n);\n\nQuestion: If the Ovrs is less than 2, what's the average in Wkts?" }, { "role": "assistant", "content": "SELECT AVG(\"wkts\") FROM \"twenty20_internationals\" WHERE \"ovrs\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"twenty20_internationals\" (\n \"player\" text,\n \"wkts\" real,\n \"runs\" real,\n \"econ\" real,\n \"ovrs\" real\n);\n\nQuestion: If Adam Voges had less than 28.5 Ovrs, what are his highest Wkts?" }, { "role": "assistant", "content": "SELECT MAX(\"wkts\") FROM \"twenty20_internationals\" WHERE \"ovrs\"<28.5 AND \"player\"='adam voges';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_statistics\" (\n \"year\" text,\n \"team\" text,\n \"t_tkl\" real,\n \"solo\" real,\n \"sacks\" real,\n \"pass_def\" real\n);\n\nQuestion: How many sacks have 2006 as the year, and a solo less than 62?" }, { "role": "assistant", "content": "SELECT SUM(\"sacks\") FROM \"professional_statistics\" WHERE \"year\"='2006' AND \"solo\"<62;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_statistics\" (\n \"year\" text,\n \"team\" text,\n \"t_tkl\" real,\n \"solo\" real,\n \"sacks\" real,\n \"pass_def\" real\n);\n\nQuestion: What is the average pass def that has green bay packers as the team, 62 as the solo and sacks less than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"pass_def\") FROM \"professional_statistics\" WHERE \"team\"='green bay packers' AND \"solo\"=62 AND \"sacks\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_statistics\" (\n \"year\" text,\n \"team\" text,\n \"t_tkl\" real,\n \"solo\" real,\n \"sacks\" real,\n \"pass_def\" real\n);\n\nQuestion: How many sacks have 72 as the solo and a TTkl less than 112?" }, { "role": "assistant", "content": "SELECT COUNT(\"sacks\") FROM \"professional_statistics\" WHERE \"solo\"=72 AND \"t_tkl\"<112;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_statistics\" (\n \"year\" text,\n \"team\" text,\n \"t_tkl\" real,\n \"solo\" real,\n \"sacks\" real,\n \"pass_def\" real\n);\n\nQuestion: How many TTkl have 2004 as the year, and a pass def greater than 5?" }, { "role": "assistant", "content": "SELECT SUM(\"t_tkl\") FROM \"professional_statistics\" WHERE \"year\"='2004' AND \"pass_def\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_otago_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the highest decile of Tarras school, which had a state authority?" }, { "role": "assistant", "content": "SELECT MAX(\"decile\") FROM \"central_otago_district\" WHERE \"authority\"='state' AND \"name\"='tarras school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_otago_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the decile of the school with a roll larger than 513?" }, { "role": "assistant", "content": "SELECT SUM(\"decile\") FROM \"central_otago_district\" WHERE \"roll\">513;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_otago_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the area of Cromwell Primary school, which has a state authority?" }, { "role": "assistant", "content": "SELECT \"area\" FROM \"central_otago_district\" WHERE \"authority\"='state' AND \"name\"='cromwell primary school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_bowling_figures\" (\n \"player\" text,\n \"overs\" real,\n \"figures\" text,\n \"opponent\" text,\n \"ground\" text\n);\n\nQuestion: Which player has figures of 4/14?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"best_bowling_figures\" WHERE \"figures\"='4/14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_bowling_figures\" (\n \"player\" text,\n \"overs\" real,\n \"figures\" text,\n \"opponent\" text,\n \"ground\" text\n);\n\nQuestion: How many overs occurred at Waca Ground against Queensland?" }, { "role": "assistant", "content": "SELECT \"overs\" FROM \"best_bowling_figures\" WHERE \"ground\"='waca ground' AND \"opponent\"='queensland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_bowling_figures\" (\n \"player\" text,\n \"overs\" real,\n \"figures\" text,\n \"opponent\" text,\n \"ground\" text\n);\n\nQuestion: At which ground did Dirk Nannes have a figure of 4/23?" }, { "role": "assistant", "content": "SELECT \"ground\" FROM \"best_bowling_figures\" WHERE \"figures\"='4/23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_bowling_figures\" (\n \"player\" text,\n \"overs\" real,\n \"figures\" text,\n \"opponent\" text,\n \"ground\" text\n);\n\nQuestion: Who was the opponent when Steven Smith had 3.3 overs?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"best_bowling_figures\" WHERE \"overs\"=3.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_losses\" (\n \"margin\" real,\n \"score\" text,\n \"opponent\" text,\n \"venue\" text,\n \"year\" real\n);\n\nQuestion: Name the average year for brookvale oval and margin more than 46" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"biggest_losses\" WHERE \"venue\"='brookvale oval' AND \"margin\">46;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_losses\" (\n \"margin\" real,\n \"score\" text,\n \"opponent\" text,\n \"venue\" text,\n \"year\" real\n);\n\nQuestion: Name the most year for brookvale oval" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"biggest_losses\" WHERE \"venue\"='brookvale oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"biggest_losses\" (\n \"margin\" real,\n \"score\" text,\n \"opponent\" text,\n \"venue\" text,\n \"year\" real\n);\n\nQuestion: Name the average year for manly-warringah sea eagles" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"biggest_losses\" WHERE \"opponent\"='manly-warringah sea eagles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_19_10_9\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who is the partner with a score of 6\u20131, 6\u20134?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_19_10_9\" WHERE \"score\"='6\u20131, 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_statistics\" (\n \"season\" text,\n \"overall_spectators\" real,\n \"per_game\" real,\n \"best_supported_club\" text,\n \"spectators_game\" real,\n \"top_goal_scorer\" text,\n \"goals\" real\n);\n\nQuestion: what is the best supported club with a 25 Goal and a per game larger than 1,156?" }, { "role": "assistant", "content": "SELECT \"best_supported_club\" FROM \"league_statistics\" WHERE \"goals\"=25 AND \"per_game\">'1,156';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"sport\" text,\n \"competition_name\" text,\n \"competing_entities\" text,\n \"age_groups\" text,\n \"held_every\" text\n);\n\nQuestion: What are the age groups for the Big League World Series?" }, { "role": "assistant", "content": "SELECT \"age_groups\" FROM \"men\" WHERE \"competition_name\"='big league world series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"sport\" text,\n \"competition_name\" text,\n \"competing_entities\" text,\n \"age_groups\" text,\n \"held_every\" text\n);\n\nQuestion: How often is the table tennis competition held?" }, { "role": "assistant", "content": "SELECT \"held_every\" FROM \"men\" WHERE \"sport\"='table tennis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"sport\" text,\n \"competition_name\" text,\n \"competing_entities\" text,\n \"age_groups\" text,\n \"held_every\" text\n);\n\nQuestion: How often is the cricket competition held?" }, { "role": "assistant", "content": "SELECT \"held_every\" FROM \"men\" WHERE \"sport\"='cricket';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance of the Blue Jays' game when their record was 47-43?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"record\"='47-43';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which year had a Cosworth V8 engine and 12 points?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\"=12 AND \"engine\"='cosworth v8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points did the ATS Wheels entrant with an ATS D2 chassis have?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='ats wheels' AND \"chassis\"='ats d2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many races have less than 2 podiums and 19th position before 2009?" }, { "role": "assistant", "content": "SELECT AVG(\"races\") FROM \"career_summary\" WHERE \"podiums\"<2 AND \"position\"='19th' AND \"season\"<2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which co drivers are 3rd in Joest racing?" }, { "role": "assistant", "content": "SELECT \"co_drivers\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"pos\"='3rd' AND \"team\"='joest racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: When was radek necas with less than 2.04 height born?" }, { "role": "assistant", "content": "SELECT AVG(\"year_born\") FROM \"fiba_euro_basket_2007_squads\" WHERE \"player\"='radek necas' AND \"height\"<2.04;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: How tall was the member of Nymburk, who was born in 1982?" }, { "role": "assistant", "content": "SELECT MAX(\"height\") FROM \"fiba_euro_basket_2007_squads\" WHERE \"year_born\"=1982 AND \"current_club\"='nymburk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real\n);\n\nQuestion: What Kerry number does Taylor county have with more than 65 others#?" }, { "role": "assistant", "content": "SELECT COUNT(\"kerrynum\") FROM \"by_county\" WHERE \"county\"='taylor' AND \"othersnum\">65;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real\n);\n\nQuestion: What is the smallest bush# with 66.0% bush and less than 65 others#?" }, { "role": "assistant", "content": "SELECT MIN(\"bushnum\") FROM \"by_county\" WHERE \"bushpct\"='66.0%' AND \"othersnum\"<65;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"west_indies_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who was the captain of the away team at Adelaide Oval?" }, { "role": "assistant", "content": "SELECT \"away_captain\" FROM \"west_indies_in_australia\" WHERE \"venue\"='adelaide oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"west_indies_in_australia\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is the final score at Melbourne Cricket Ground?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"west_indies_in_australia\" WHERE \"venue\"='melbourne cricket ground';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the score for april 28" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the average Heat for anjelika solovieva?" }, { "role": "assistant", "content": "SELECT AVG(\"heat\") FROM \"heats\" WHERE \"name\"='anjelika solovieva';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the average lane with Netherlands Antilles Nationality?" }, { "role": "assistant", "content": "SELECT AVG(\"lane\") FROM \"heats\" WHERE \"nationality\"='netherlands antilles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the finish of the year with start 5?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"start\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the rank in 1940?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"year\"='1940';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the highest laps of the year when the rank was 14?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"indy_500_results\" WHERE \"rank\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What year had 134 laps?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\"=134;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the finish when there was more than 192 laps and a qual of 135.736?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"laps\">192 AND \"qual\"='135.736';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Witch opponent has a loss of Glynn (0-2)?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='glynn (0-2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_iwa_champions\" (\n \"championship\" text,\n \"champion_s\" text,\n \"previous_champion_s\" text,\n \"date_won\" text,\n \"location\" text\n);\n\nQuestion: Who was the previous champion of the title won on July 7, 2010?" }, { "role": "assistant", "content": "SELECT \"previous_champion_s\" FROM \"current_iwa_champions\" WHERE \"date_won\"='july 7, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_iwa_champions\" (\n \"championship\" text,\n \"champion_s\" text,\n \"previous_champion_s\" text,\n \"date_won\" text,\n \"location\" text\n);\n\nQuestion: When did Bonecrusher win the championship at Bayam\u00f3n, Puerto Rico?" }, { "role": "assistant", "content": "SELECT \"date_won\" FROM \"current_iwa_champions\" WHERE \"location\"='bayam\u00f3n, puerto rico' AND \"champion_s\"='bonecrusher';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_iwa_champions\" (\n \"championship\" text,\n \"champion_s\" text,\n \"previous_champion_s\" text,\n \"date_won\" text,\n \"location\" text\n);\n\nQuestion: Who is the champion of the title previously held by Lash?" }, { "role": "assistant", "content": "SELECT \"champion_s\" FROM \"current_iwa_champions\" WHERE \"previous_champion_s\"='lash';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_iwa_champions\" (\n \"championship\" text,\n \"champion_s\" text,\n \"previous_champion_s\" text,\n \"date_won\" text,\n \"location\" text\n);\n\nQuestion: Which championship was won on July 7, 2010?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"current_iwa_champions\" WHERE \"date_won\"='july 7, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" real,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: Who has 6/1 odds?" }, { "role": "assistant", "content": "SELECT \"trainer\" FROM \"race_record\" WHERE \"odds\"='6/1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" real,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: What is the total dist with Johnny Murtagh and less than 26 runners?" }, { "role": "assistant", "content": "SELECT SUM(\"dist_f\") FROM \"race_record\" WHERE \"jockey\"='johnny murtagh' AND \"runners\"<26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" real,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: Who has 5/1 odds?" }, { "role": "assistant", "content": "SELECT \"jockey\" FROM \"race_record\" WHERE \"odds\"='5/1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"class\" text,\n \"prize_k\" real,\n \"odds\" text,\n \"runners\" real,\n \"placing\" real,\n \"margin\" real,\n \"time\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: What course did Fergal Lynch end up with 5/1 odds?" }, { "role": "assistant", "content": "SELECT \"course\" FROM \"race_record\" WHERE \"jockey\"='fergal lynch' AND \"odds\"='5/1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"name\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What place has a To par of +4 and a score of 74-70-74-74=292?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"to_par\"='+4' AND \"score\"='74-70-74-74=292';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"name\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What place in the United States has a To par of e?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"country\"='united states' AND \"to_par\"='e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"name\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the To par for the place in the United States and a score of 74-69-71-74=288?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"country\"='united states' AND \"score\"='74-69-71-74=288';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What Venue is listed that has a Year smaller than 2005 and a Position of 10th (sf)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"competition_record\" WHERE \"year\"<2005 AND \"position\"='10th (sf)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What's the average Year for the Position of 7th (sf)?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"competition_record\" WHERE \"position\"='7th (sf)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What's the highest Year for the Venue of Santiago De Chile and the Event of 800 m?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"competition_record\" WHERE \"event\"='800 m' AND \"venue\"='santiago de chile';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What Venue has a Position of 12th (sf)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"competition_record\" WHERE \"position\"='12th (sf)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which engine has an Entrant of team lotus, and a Year larger than 1962?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"complete_world_championship_formula_one_\" WHERE \"entrant\"='team lotus' AND \"year\">1962;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points have a Year larger than 1966?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"complete_world_championship_formula_one_\" WHERE \"year\">1966;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the smallest number of points with an Engine of climax v8, and a Year of 1966?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_world_championship_formula_one_\" WHERE \"engine\"='climax v8' AND \"year\"=1966;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points did Team Rothmans International have after 1975 when their Chassis was a March 771?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1975 AND \"entrant\"='team rothmans international' AND \"chassis\"='march 771';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What Nationality of the person who has a Rank of 4" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"lane\"<4 AND \"rank\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"stadium\" text\n);\n\nQuestion: Name the score on october 14" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='october 14';" } ]