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 \"six_man_elimination_tag_team_match\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: What Elimination number is listed againt Eliminated by Sonjay Dutt?" }, { "role": "assistant", "content": "SELECT \"elimination\" FROM \"six_man_elimination_tag_team_match\" WHERE \"eliminated_by\"='sonjay dutt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"six_man_elimination_tag_team_match\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: What time is listed against the Wrestler Jimmy Rave?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"six_man_elimination_tag_team_match\" WHERE \"wrestler\"='jimmy rave';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"six_man_elimination_tag_team_match\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: Which Wrestler has an Elimination of 5?" }, { "role": "assistant", "content": "SELECT \"wrestler\" FROM \"six_man_elimination_tag_team_match\" WHERE \"elimination\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"six_man_elimination_tag_team_match\" (\n \"elimination\" text,\n \"wrestler\" text,\n \"eliminated_by\" text,\n \"elimination_move\" text,\n \"time\" text\n);\n\nQuestion: What time is listed against Elimination number 2?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"six_man_elimination_tag_team_match\" WHERE \"elimination\"='2';" } ]
[ { "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 \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What score has 2 as the place?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round\" WHERE \"place\"='2';" } ]
[ { "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 \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the average money (\u00a3) that has +8 as the to par, with 73-72-72-71=288 as the score?" }, { "role": "assistant", "content": "SELECT AVG(\"money\") FROM \"final_round\" WHERE \"to_par\"='+8' AND \"score\"='73-72-72-71=288';" } ]
[ { "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 \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What place has money (\u00a3) greater than 17,333 with +8 as the to par, and seve ballesteros as the player?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"money\">'17,333' AND \"to_par\"='+8' AND \"player\"='seve ballesteros';" } ]
[ { "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 \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What country has t6 as the place, with seve ballesteros as the player?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final_round\" WHERE \"place\"='t6' AND \"player\"='seve ballesteros';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_champions\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What year weas John McEnroe the champion?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"singles_champions\" WHERE \"champion\"='john mcenroe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_champions\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Who was the runner-up, when the champion was Bj\u00f6rn Borg after 1978?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"singles_champions\" WHERE \"champion\"='bj\u00f6rn borg' AND \"year\">1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_champions\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Who was the champion earlier than 1978 when the runner-up was Jimmy Connors?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"singles_champions\" WHERE \"runner_up\"='jimmy connors' AND \"year\"<1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"code\" real,\n \"municipality\" text,\n \"county\" text,\n \"population\" real,\n \"total_area\" text,\n \"density_per_km_2_land\" real\n);\n\nQuestion: Which municipality has the code 2401?" }, { "role": "assistant", "content": "SELECT \"municipality\" FROM \"references\" WHERE \"code\"=2401;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"code\" real,\n \"municipality\" text,\n \"county\" text,\n \"population\" real,\n \"total_area\" text,\n \"density_per_km_2_land\" real\n);\n\nQuestion: What is the population of Danderyd municipality in Stockholm County with a code lower than 162?" }, { "role": "assistant", "content": "SELECT COUNT(\"population\") FROM \"references\" WHERE \"county\"='stockholm county' AND \"municipality\"='danderyd municipality' AND \"code\"<162;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"code\" real,\n \"municipality\" text,\n \"county\" text,\n \"population\" real,\n \"total_area\" text,\n \"density_per_km_2_land\" real\n);\n\nQuestion: What is the total area for a code less than 1862 and a density (per km 2 land) of 21.6?" }, { "role": "assistant", "content": "SELECT \"total_area\" FROM \"references\" WHERE \"code\"<1862 AND \"density_per_km_2_land\"=21.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text\n);\n\nQuestion: what total was the lowest and had a to par of e?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"missed_the_cut\" WHERE \"to_par\"='e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text\n);\n\nQuestion: Which player played in the united states and scored a total of 144 points?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"country\"='united states' AND \"total\"=144;" } ]
[ { "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 \"year\" real,\n \"lok_sabha\" text,\n \"members_of_parliament\" text,\n \"party_won\" text,\n \"winner_s_pct_votes\" text,\n \"trailing_party\" text,\n \"trailing_party_pct_votes\" text\n);\n\nQuestion: What is Trailing Party % Votes, when Party Won is \"Bharatiya Janta Party\", and when Trailing Party is \"Indian National Congress\"?" }, { "role": "assistant", "content": "SELECT \"trailing_party_pct_votes\" FROM \"members_of_parliament\" WHERE \"party_won\"='bharatiya janta party' AND \"trailing_party\"='indian national congress';" } ]
[ { "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 \"year\" real,\n \"lok_sabha\" text,\n \"members_of_parliament\" text,\n \"party_won\" text,\n \"winner_s_pct_votes\" text,\n \"trailing_party\" text,\n \"trailing_party_pct_votes\" text\n);\n\nQuestion: What is the total number of Year(s), when Trailing Party is \"Indian National Congress\", and when Trailing Party % Votes is \"27.42%\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"members_of_parliament\" WHERE \"trailing_party\"='indian national congress' AND \"trailing_party_pct_votes\"='27.42%';" } ]
[ { "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 \"year\" real,\n \"lok_sabha\" text,\n \"members_of_parliament\" text,\n \"party_won\" text,\n \"winner_s_pct_votes\" text,\n \"trailing_party\" text,\n \"trailing_party_pct_votes\" text\n);\n\nQuestion: What is Members of Parliament, when Trailing Party is \"Bharatiya Lok Dal\"?" }, { "role": "assistant", "content": "SELECT \"members_of_parliament\" FROM \"members_of_parliament\" WHERE \"trailing_party\"='bharatiya lok dal';" } ]
[ { "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 \"year\" real,\n \"lok_sabha\" text,\n \"members_of_parliament\" text,\n \"party_won\" text,\n \"winner_s_pct_votes\" text,\n \"trailing_party\" text,\n \"trailing_party_pct_votes\" text\n);\n\nQuestion: What is Trailing Party, when Party Won is \"Janata Dal\", and when Year is \"1996\"?" }, { "role": "assistant", "content": "SELECT \"trailing_party\" FROM \"members_of_parliament\" WHERE \"party_won\"='janata dal' AND \"year\"=1996;" } ]
[ { "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 \"year\" real,\n \"lok_sabha\" text,\n \"members_of_parliament\" text,\n \"party_won\" text,\n \"winner_s_pct_votes\" text,\n \"trailing_party\" text,\n \"trailing_party_pct_votes\" text\n);\n\nQuestion: What is the lowest Year, when Lok Sabha is \"4th Lok Sabha\"?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"members_of_parliament\" WHERE \"lok_sabha\"='4th lok sabha';" } ]
[ { "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 \"year\" real,\n \"lok_sabha\" text,\n \"members_of_parliament\" text,\n \"party_won\" text,\n \"winner_s_pct_votes\" text,\n \"trailing_party\" text,\n \"trailing_party_pct_votes\" text\n);\n\nQuestion: What is Members of Parliament, when Winner's % Votes is \"50.54%\"?" }, { "role": "assistant", "content": "SELECT \"members_of_parliament\" FROM \"members_of_parliament\" WHERE \"winner_s_pct_votes\"='50.54%';" } ]
[ { "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: Who scored a 68?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round\" WHERE \"score\"=68;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many Grid has a Rider of ryuichi kiyonari?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"superbike_race_1_classification\" WHERE \"rider\"='ryuichi kiyonari';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Name the lowest Grid which has a Bike of ducati 1098 rs 08 and a Rider of max biaggi?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"superbike_race_1_classification\" WHERE \"bike\"='ducati 1098 rs 08' AND \"rider\"='max biaggi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Name the Rider which has a Time of +59.304?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"superbike_race_1_classification\" WHERE \"time\"='+59.304';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Name the Rider which has Laps smaller than 11 and a Bike of kawasaki zx-10r, and a Grid of 8?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"superbike_race_1_classification\" WHERE \"laps\"<11 AND \"bike\"='kawasaki zx-10r' AND \"grid\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the total for player karrie webb?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"missed_the_cut\" WHERE \"player\"='karrie webb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What years did the player with a total larger than 157 have wins?" }, { "role": "assistant", "content": "SELECT \"year_s_won\" FROM \"missed_the_cut\" WHERE \"total\">157;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the sum of the to par of player meg mallon, who had a total greater than 157?" }, { "role": "assistant", "content": "SELECT SUM(\"to_par\") FROM \"missed_the_cut\" WHERE \"player\"='meg mallon' AND \"total\">157;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the highest total of the player with a 7 to par?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"missed_the_cut\" WHERE \"to_par\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_statistics\" (\n \"player\" text,\n \"seasons\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text\n);\n\nQuestion: How many assists did Steve Walker have?" }, { "role": "assistant", "content": "SELECT \"assists\" FROM \"club_statistics\" WHERE \"player\"='steve walker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_statistics\" (\n \"player\" text,\n \"seasons\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text\n);\n\nQuestion: How many goals did the player score who had 33 assists in 85 games?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"club_statistics\" WHERE \"assists\"='33' AND \"games\"='85';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_statistics\" (\n \"player\" text,\n \"seasons\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text\n);\n\nQuestion: How many points did Denis Pederson have?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"club_statistics\" WHERE \"player\"='denis pederson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"phase_changes_and_critical_properties\" (\n \"physical_property\" text,\n \"helium\" text,\n \"neon\" text,\n \"argon\" text,\n \"krypton\" text,\n \"xenon\" text\n);\n\nQuestion: Which Xenon has a Helium of 5.1?" }, { "role": "assistant", "content": "SELECT \"xenon\" FROM \"phase_changes_and_critical_properties\" WHERE \"helium\"='5.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"phase_changes_and_critical_properties\" (\n \"physical_property\" text,\n \"helium\" text,\n \"neon\" text,\n \"argon\" text,\n \"krypton\" text,\n \"xenon\" text\n);\n\nQuestion: Which Neon has a Argon of \u2212189.6?" }, { "role": "assistant", "content": "SELECT \"neon\" FROM \"phase_changes_and_critical_properties\" WHERE \"argon\"='\u2212189.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"phase_changes_and_critical_properties\" (\n \"physical_property\" text,\n \"helium\" text,\n \"neon\" text,\n \"argon\" text,\n \"krypton\" text,\n \"xenon\" text\n);\n\nQuestion: Which Physical property has a Helium of 0.0693?" }, { "role": "assistant", "content": "SELECT \"physical_property\" FROM \"phase_changes_and_critical_properties\" WHERE \"helium\"='0.0693';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"phase_changes_and_critical_properties\" (\n \"physical_property\" text,\n \"helium\" text,\n \"neon\" text,\n \"argon\" text,\n \"krypton\" text,\n \"xenon\" text\n);\n\nQuestion: Name the Argon which has a Neon of 0.484?" }, { "role": "assistant", "content": "SELECT \"argon\" FROM \"phase_changes_and_critical_properties\" WHERE \"neon\"='0.484';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"phase_changes_and_critical_properties\" (\n \"physical_property\" text,\n \"helium\" text,\n \"neon\" text,\n \"argon\" text,\n \"krypton\" text,\n \"xenon\" text\n);\n\nQuestion: Which Krypton has a Physical property of critical pressure (atm)?" }, { "role": "assistant", "content": "SELECT \"krypton\" FROM \"phase_changes_and_critical_properties\" WHERE \"physical_property\"='critical pressure (atm)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"phase_changes_and_critical_properties\" (\n \"physical_property\" text,\n \"helium\" text,\n \"neon\" text,\n \"argon\" text,\n \"krypton\" text,\n \"xenon\" text\n);\n\nQuestion: which Helium has a Argon of \u2212189.6?" }, { "role": "assistant", "content": "SELECT \"helium\" FROM \"phase_changes_and_critical_properties\" WHERE \"argon\"='\u2212189.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Venue, when Opposing Teams is \"South Africa\", and when Date is \"17/06/2000\"?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"2000\" WHERE \"opposing_teams\"='south africa' AND \"date\"='17/06/2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the sum of Against, when Opposing Teams is \"South Africa\", and when Status is \"First Test\"?" }, { "role": "assistant", "content": "SELECT SUM(\"against\") FROM \"2000\" WHERE \"opposing_teams\"='south africa' AND \"status\"='first test';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Opposing Teams, when Status is \"Test Match\", and when Date is \"25/11/2000\"?" }, { "role": "assistant", "content": "SELECT \"opposing_teams\" FROM \"2000\" WHERE \"status\"='test match' AND \"date\"='25/11/2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Against, when Venue is \"Twickenham , London\", and when Date is \"04/03/2000\"?" }, { "role": "assistant", "content": "SELECT \"against\" FROM \"2000\" WHERE \"venue\"='twickenham , london' AND \"date\"='04/03/2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the Statue, when Venue is \"Stadio Flaminio , Rome\"?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"2000\" WHERE \"venue\"='stadio flaminio , rome';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the H/A of the game on 24 january 2009?" }, { "role": "assistant", "content": "SELECT \"h_a\" FROM \"fa_cup\" WHERE \"date\"='24 january 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_career_history\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" text\n);\n\nQuestion: What year was the rank final of 6?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"junior_career_history\" WHERE \"rank_final\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_career_history\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" text\n);\n\nQuestion: What was the rank final before 2007?" }, { "role": "assistant", "content": "SELECT \"rank_final\" FROM \"junior_career_history\" WHERE \"year\"<2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is District, when Incumbent is \"Richard Neal\"?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"massachusetts\" WHERE \"incumbent\"='richard neal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the lowest First Elected, when District is \"Massachusetts 10\"?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"massachusetts\" WHERE \"district\"='massachusetts 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"massachusetts\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the average First Elected, when District is \"Massachusetts 3\"?" }, { "role": "assistant", "content": "SELECT AVG(\"first_elected\") FROM \"massachusetts\" WHERE \"district\"='massachusetts 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What team lost with 30 tries against?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"league_table\" WHERE \"tries_against\"='30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: Who lost with 142 points for?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"league_table\" WHERE \"points_for\"='142';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: How many tries against for the team with 67 tries for?" }, { "role": "assistant", "content": "SELECT \"tries_against\" FROM \"league_table\" WHERE \"tries_for\"='67';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: Which club has 101 tries for?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"league_table\" WHERE \"tries_for\"='101';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What is the try bonus for the team with 67 tries for?" }, { "role": "assistant", "content": "SELECT \"try_bonus\" FROM \"league_table\" WHERE \"tries_for\"='67';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What is the team that lost with 77 tries against?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"league_table\" WHERE \"tries_against\"='77';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"team\" text,\n \"p_desc\" real,\n \"p_2007\" real,\n \"p_ap_2008\" real,\n \"p_cl_2008\" real\n);\n\nQuestion: What is the sum of P desc with a P 2007 of 0,00 and a P, Ap 2008 less than 30,00, and a P CL 2008 that is more than 10,56?" }, { "role": "assistant", "content": "SELECT SUM(\"p_desc\") FROM \"relegation_table\" WHERE \"p_2007\"='0,00' AND \"p_ap_2008\"<'30,00' AND \"p_cl_2008\">'10,56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_special_prizes\" (\n \"name\" text,\n \"total\" real,\n \"outstanding_performance\" real,\n \"fighting_spirit\" real,\n \"technique\" real,\n \"years\" text,\n \"highest_rank\" text\n);\n\nQuestion: Which Fighting Spirit has a Name of tsurugamine, and a Technique smaller than 10?" }, { "role": "assistant", "content": "SELECT AVG(\"fighting_spirit\") FROM \"most_special_prizes\" WHERE \"name\"='tsurugamine' AND \"technique\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_special_prizes\" (\n \"name\" text,\n \"total\" real,\n \"outstanding_performance\" real,\n \"fighting_spirit\" real,\n \"technique\" real,\n \"years\" text,\n \"highest_rank\" text\n);\n\nQuestion: How much Technique has the Highest rank of yokozuna, and a Total larger than 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"technique\") FROM \"most_special_prizes\" WHERE \"highest_rank\"='yokozuna' AND \"total\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_special_prizes\" (\n \"name\" text,\n \"total\" real,\n \"outstanding_performance\" real,\n \"fighting_spirit\" real,\n \"technique\" real,\n \"years\" text,\n \"highest_rank\" text\n);\n\nQuestion: How much Fighting Spirit has a Total of 13, and a Technique smaller than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"fighting_spirit\") FROM \"most_special_prizes\" WHERE \"total\"=13 AND \"technique\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_special_prizes\" (\n \"name\" text,\n \"total\" real,\n \"outstanding_performance\" real,\n \"fighting_spirit\" real,\n \"technique\" real,\n \"years\" text,\n \"highest_rank\" text\n);\n\nQuestion: What are asashio's years?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"most_special_prizes\" WHERE \"name\"='asashio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: Which County has a Precincts of 33/33?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"u_s_house_district_11\" WHERE \"precincts\"='33/33';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: Name the T. Wyka has a Precincts of 51/55?" }, { "role": "assistant", "content": "SELECT \"t_wyka\" FROM \"u_s_house_district_11\" WHERE \"precincts\"='51/55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: Which Precincts has a G. Hager of 2,260 (15%)?" }, { "role": "assistant", "content": "SELECT \"precincts\" FROM \"u_s_house_district_11\" WHERE \"g_hager\"='2,260 (15%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: Name the G. Hager of E. Greenberg of 266 (14%)?" }, { "role": "assistant", "content": "SELECT \"g_hager\" FROM \"u_s_house_district_11\" WHERE \"e_greenberg\"='266 (14%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: Which Precincts has a County of passaic?" }, { "role": "assistant", "content": "SELECT \"precincts\" FROM \"u_s_house_district_11\" WHERE \"county\"='passaic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_house_district_11\" (\n \"county\" text,\n \"precincts\" text,\n \"e_greenberg\" text,\n \"g_hager\" text,\n \"t_wyka\" text\n);\n\nQuestion: Which E. Greenberg has a T. Wyka of 10,793 (70%)?" }, { "role": "assistant", "content": "SELECT \"e_greenberg\" FROM \"u_s_house_district_11\" WHERE \"t_wyka\"='10,793 (70%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which player from England finished in T41?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"finish\"='t41' AND \"country\"='england';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: From which country is the player that won in 1998?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: In 1997, what was the final total?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What was the To Par score for player Justin Leonard?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"player\"='justin leonard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_statistics\" (\n \"player\" text,\n \"seasons\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text\n);\n\nQuestion: How many points were scored by the player who played 348 games?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"club_statistics\" WHERE \"games\"='348';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_statistics\" (\n \"player\" text,\n \"seasons\" text,\n \"games\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text\n);\n\nQuestion: How many points were scored by the player who played 363 games?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"club_statistics\" WHERE \"games\"='363';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What kind of Replaced has a Manner of departure of end of contract on dec. 16, 2008?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='end of contract' AND \"date_of_appointment\"='dec. 16, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What kind of Replaced has a Outgoing manager of guillermo sanguinetti?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='guillermo sanguinetti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What kind of Replaced has a Team of gimnasia y esgrima (lp)?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"team\"='gimnasia y esgrima (lp)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Which Team has a Position in table of 15th (c)?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"position_in_table\"='15th (c)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Which Team that has a Position in table of 15th (a) and a Outgoing manager of claudio borghi?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"position_in_table\"='15th (a)' AND \"outgoing_manager\"='claudio borghi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Which Team has a Date of appointment on sep. 20, 2008?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='sep. 20, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What was the highest number of losses for a position less than 6, with more than 11 wins and 36 points, with a played entry of more than 30?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"group_i\" WHERE \"position\"<6 AND \"wins\">11 AND \"points\"=36 AND \"played\">30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the total number of wins for the entry that has fewer than 49 goals against, 39 goals for, 9 draws, and fewer than 31 points?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"group_i\" WHERE \"goals_against\"<49 AND \"draws\"=9 AND \"goals_for\"=39 AND \"points\"<31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the average number of goals for entries with more than 12 losses, more than 10 wins, more than 3 draws, and fewer than 29 points?" }, { "role": "assistant", "content": "SELECT AVG(\"goals_for\") FROM \"group_i\" WHERE \"losses\">12 AND \"wins\">10 AND \"points\"<29 AND \"draws\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the highest number of wins for club Cd Orense, with points greater than 36 and more than 4 draws?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"group_i\" WHERE \"draws\">4 AND \"club\"='cd orense' AND \"points\">36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the total number of played for the entry with a position of less than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"group_i\" WHERE \"position\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: For the match that lasted 3:53 minutes, what was the final record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='3:53';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Where was the UFC 154 match held?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 154';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs_12\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg that has a Rc Cannes Team 1?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"playoffs_12\" WHERE \"team_1\"='rc cannes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2_lyga_zone_north\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest positioned club with points greater than 40, 16 wins and losses less than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"position\") FROM \"2_lyga_zone_north\" WHERE \"points\">40 AND \"wins\"=16 AND \"loses\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2_lyga_zone_north\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest positioned team with 2 wins and losses greater than 13?" }, { "role": "assistant", "content": "SELECT MIN(\"position\") FROM \"2_lyga_zone_north\" WHERE \"wins\"=2 AND \"loses\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2_lyga_zone_north\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the smallest number of wins where goals conceded are below 26, draws are 1 and goals scored are below 74?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"2_lyga_zone_north\" WHERE \"goals_conceded\"<26 AND \"draws\"=1 AND \"goals_scored\"<74;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2_lyga_zone_north\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: For the club Minija Kretinga, what's the lowest number of wins with points smaller than 25, goals at 22 and goals conceded below 39?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"2_lyga_zone_north\" WHERE \"points\"<25 AND \"goals_scored\"=22 AND \"club\"='minija kretinga' AND \"goals_conceded\"<39;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_men\" (\n \"year\" real,\n \"place\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: In which Place was the Silver won by valeri postoianov ( urs ) later than 1969 and the Bronze won by alexander gazov ( urs )?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"world_championships_men\" WHERE \"silver\"='valeri postoianov ( urs )' AND \"year\">1969 AND \"bronze\"='alexander gazov ( urs )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_men\" (\n \"year\" real,\n \"place\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: Who won the Bronze at Melbourne?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"world_championships_men\" WHERE \"place\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_men\" (\n \"year\" real,\n \"place\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: In what Place was the Silver won by vladimir vesselov ( urs )?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"world_championships_men\" WHERE \"silver\"='vladimir vesselov ( urs )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winter_1997_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: WHAT IS THE 6:30PM WITH BEETLEBORGS METALLIX AT 3:30PM?" }, { "role": "assistant", "content": "SELECT \"6_30_pm\" FROM \"winter_1997_1998\" WHERE \"3_30_pm\"='beetleborgs metallix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winter_1997_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: WHAT IS THE 1:00PM WITH LOCAL PROGRAMS AT 3:00PM?" }, { "role": "assistant", "content": "SELECT \"1_00_pm\" FROM \"winter_1997_1998\" WHERE \"3_00_pm\"='local programs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winter_1997_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: WHAT IS THE 8:00AM WITH LOCAL PROGRAMS AT 3:00PM?" }, { "role": "assistant", "content": "SELECT \"8_00_am\" FROM \"winter_1997_1998\" WHERE \"3_00_pm\"='local programs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winter_1997_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: WHAT IS THE 11:00AM WITH LOCAL PROGRAMS AT 1:30PM?" }, { "role": "assistant", "content": "SELECT \"11_00_am\" FROM \"winter_1997_1998\" WHERE \"1_30_pm\"='local programs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winter_1997_1998\" (\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: WHAT IS THE 2:00PM WITH SUNSET BEACH AT NOON?" }, { "role": "assistant", "content": "SELECT \"2_00_pm\" FROM \"winter_1997_1998\" WHERE \"noon\"='sunset beach';" } ]