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 \"advocates\" (\n \"advocate\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"poll_wins\" real,\n \"poll_losses\" real\n);\n\nQuestion: What is the highest poll of the advocate Andy Kindler with poll losses greater than 2 and ties less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"poll_wins\") FROM \"advocates\" WHERE \"poll_losses\">2 AND \"advocate\"='andy kindler' AND \"ties\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"events\" real,\n \"cashes\" real,\n \"match_play\" real,\n \"tv_finals\" real,\n \"pba_titles\" real,\n \"average\" real,\n \"earnings\" text\n);\n\nQuestion: Which PBA Titles has a TV Finals larger than 6, and an Events larger than 20?" }, { "role": "assistant", "content": "SELECT AVG(\"pba_titles\") FROM \"career_statistics\" WHERE \"tv_finals\">6 AND \"events\">20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"events\" real,\n \"cashes\" real,\n \"match_play\" real,\n \"tv_finals\" real,\n \"pba_titles\" real,\n \"average\" real,\n \"earnings\" text\n);\n\nQuestion: Which Events has Earnings of $113,259, and an Average larger than 229.5?" }, { "role": "assistant", "content": "SELECT MAX(\"events\") FROM \"career_statistics\" WHERE \"earnings\"='$113,259' AND \"average\">229.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"events\" real,\n \"cashes\" real,\n \"match_play\" real,\n \"tv_finals\" real,\n \"pba_titles\" real,\n \"average\" real,\n \"earnings\" text\n);\n\nQuestion: Which Cashes has a Match Play smaller than 13, and a Events of 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"cashes\") FROM \"career_statistics\" WHERE \"match_play\"<13 AND \"events\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text\n);\n\nQuestion: What is the Finish for the 1950\u201351? season?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"seasons\" WHERE \"season\"='1950\u201351';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text\n);\n\nQuestion: What is the Losses at the western conference and the 2004\u201305 season?" }, { "role": "assistant", "content": "SELECT \"losses\" FROM \"seasons\" WHERE \"conference\"='western' AND \"season\"='2004\u201305';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text\n);\n\nQuestion: What Season has wins as the philadelphia warriors (nba)?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"seasons\" WHERE \"wins\"='philadelphia warriors (nba)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text\n);\n\nQuestion: What shows for Wins when there was a Conference of \u2014, western division, in the 1967\u201368 season?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"seasons\" WHERE \"conference\"='\u2014' AND \"division\"='western' AND \"season\"='1967\u201368';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conference\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text\n);\n\nQuestion: What is the Conference for the 1967\u201368 season?" }, { "role": "assistant", "content": "SELECT \"conference\" FROM \"seasons\" WHERE \"season\"='1967\u201368';" } ]
[ { "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_incomplete\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the Location when the time was 11:55?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record_incomplete\" WHERE \"time\"='11:55';" } ]
[ { "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_incomplete\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What Round has a Time of n/a, in rio de janeiro , brazil?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record_incomplete\" WHERE \"time\"='n/a' AND \"location\"='rio de janeiro , brazil';" } ]
[ { "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_incomplete\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the Round for the jiu-jitsu vs martial arts?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record_incomplete\" WHERE \"event\"='jiu-jitsu vs martial arts';" } ]
[ { "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_incomplete\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the Location for the jiu-jitsu vs martial arts?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record_incomplete\" WHERE \"event\"='jiu-jitsu vs martial arts';" } ]
[ { "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_incomplete\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the Event when the opponent was wesslan evaristo de oliveira?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record_incomplete\" WHERE \"opponent\"='wesslan evaristo de oliveira';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"year\" real,\n \"class\" text,\n \"team_name\" text,\n \"bike\" text,\n \"riders\" text,\n \"races\" text,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"points\" text,\n \"pos\" text\n);\n\nQuestion: How many points does Kohta Nozane have with a Motobi TSR 6?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"summary\" WHERE \"bike\"='motobi tsr 6' AND \"riders\"='kohta nozane';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_bands\" (\n \"band\" text,\n \"value\" text,\n \"ratio\" text,\n \"ratio_as_pct\" text,\n \"average\" text\n);\n\nQuestion: Which Average has a Band of f?" }, { "role": "assistant", "content": "SELECT \"average\" FROM \"current_bands\" WHERE \"band\"='f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_bands\" (\n \"band\" text,\n \"value\" text,\n \"ratio\" text,\n \"ratio_as_pct\" text,\n \"average\" text\n);\n\nQuestion: Which Band has a Ratio of 9/9?" }, { "role": "assistant", "content": "SELECT \"band\" FROM \"current_bands\" WHERE \"ratio\"='9/9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_bands\" (\n \"band\" text,\n \"value\" text,\n \"ratio\" text,\n \"ratio_as_pct\" text,\n \"average\" text\n);\n\nQuestion: Which Ratio as % has a Ratio of 8/9?" }, { "role": "assistant", "content": "SELECT \"ratio_as_pct\" FROM \"current_bands\" WHERE \"ratio\"='8/9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_bands\" (\n \"band\" text,\n \"value\" text,\n \"ratio\" text,\n \"ratio_as_pct\" text,\n \"average\" text\n);\n\nQuestion: Which Value has a Ratio as % of 100%?" }, { "role": "assistant", "content": "SELECT \"value\" FROM \"current_bands\" WHERE \"ratio_as_pct\"='100%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_bands\" (\n \"band\" text,\n \"value\" text,\n \"ratio\" text,\n \"ratio_as_pct\" text,\n \"average\" text\n);\n\nQuestion: Which Ratio has a Ratio as % of 78%?" }, { "role": "assistant", "content": "SELECT \"ratio\" FROM \"current_bands\" WHERE \"ratio_as_pct\"='78%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_bands\" (\n \"band\" text,\n \"value\" text,\n \"ratio\" text,\n \"ratio_as_pct\" text,\n \"average\" text\n);\n\nQuestion: Which Band has a Ratio of 13/9?" }, { "role": "assistant", "content": "SELECT \"band\" FROM \"current_bands\" WHERE \"ratio\"='13/9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_championship_series\" (\n \"year\" real,\n \"series\" text,\n \"winning_team\" text,\n \"losing_team\" text,\n \"score\" text,\n \"site\" text\n);\n\nQuestion: What was the latest year that the Atlanta Braves won and the St. Louis Cardinals lost?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"league_championship_series\" WHERE \"winning_team\"='atlanta braves' AND \"losing_team\"='st. louis cardinals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_championship_series\" (\n \"year\" real,\n \"series\" text,\n \"winning_team\" text,\n \"losing_team\" text,\n \"score\" text,\n \"site\" text\n);\n\nQuestion: Who won the series when the San Francisco Giants lost?" }, { "role": "assistant", "content": "SELECT \"winning_team\" FROM \"league_championship_series\" WHERE \"losing_team\"='san francisco giants';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_championship_series\" (\n \"year\" real,\n \"series\" text,\n \"winning_team\" text,\n \"losing_team\" text,\n \"score\" text,\n \"site\" text\n);\n\nQuestion: Where was the series that the Kansas City Royals lost?" }, { "role": "assistant", "content": "SELECT \"site\" FROM \"league_championship_series\" WHERE \"winning_team\"='kansas city royals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_championship_series\" (\n \"year\" real,\n \"series\" text,\n \"winning_team\" text,\n \"losing_team\" text,\n \"score\" text,\n \"site\" text\n);\n\nQuestion: Who was the winning team in 2008?" }, { "role": "assistant", "content": "SELECT \"winning_team\" FROM \"league_championship_series\" WHERE \"year\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"season\" text,\n \"games\" real,\n \"lost\" real,\n \"tied\" text,\n \"points\" real,\n \"pct_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"penalty_minutes\" real\n);\n\nQuestion: What average lost has points greater than 108?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"season_by_season_results\" WHERE \"points\">108;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"season\" text,\n \"games\" real,\n \"lost\" real,\n \"tied\" text,\n \"points\" real,\n \"pct_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"penalty_minutes\" real\n);\n\nQuestion: How many losses have 222 as the goals against, with points greater than 78?" }, { "role": "assistant", "content": "SELECT SUM(\"lost\") FROM \"season_by_season_results\" WHERE \"goals_against\"=222 AND \"points\">78;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"season\" text,\n \"games\" real,\n \"lost\" real,\n \"tied\" text,\n \"points\" real,\n \"pct_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"penalty_minutes\" real\n);\n\nQuestion: How many goals against have 64 for games, a loss less than 12, with points greater than 107?" }, { "role": "assistant", "content": "SELECT SUM(\"goals_against\") FROM \"season_by_season_results\" WHERE \"games\"=64 AND \"lost\"<12 AND \"points\">107;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"result\" text,\n \"place\" real\n);\n\nQuestion: What is the place of the song 'Never Change'?" }, { "role": "assistant", "content": "SELECT SUM(\"place\") FROM \"national_final\" WHERE \"song\"='never change';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_final\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"result\" text,\n \"place\" real\n);\n\nQuestion: What is the name of Aleko Berdzenishvili's song?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"national_final\" WHERE \"artist\"='aleko berdzenishvili';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What was the lowest pick for the RHP position and player Mike Biko?" }, { "role": "assistant", "content": "SELECT MIN(\"pick\") FROM \"first_round_selections\" WHERE \"position\"='rhp' AND \"player\"='mike biko';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_preference_votes_by_constituency\" (\n \"constituency\" text,\n \"michael_d_higgins\" text,\n \"se_n_gallagher\" text,\n \"martin_mc_guinness\" text,\n \"gay_mitchell\" text,\n \"david_norris\" text,\n \"dana_rosemary_scallon\" text,\n \"mary_davis\" text\n);\n\nQuestion: What is the Martin McGuinness with a David Norris that is 10.3%?" }, { "role": "assistant", "content": "SELECT \"martin_mc_guinness\" FROM \"first_preference_votes_by_constituency\" WHERE \"david_norris\"='10.3%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_preference_votes_by_constituency\" (\n \"constituency\" text,\n \"michael_d_higgins\" text,\n \"se_n_gallagher\" text,\n \"martin_mc_guinness\" text,\n \"gay_mitchell\" text,\n \"david_norris\" text,\n \"dana_rosemary_scallon\" text,\n \"mary_davis\" text\n);\n\nQuestion: What is the Martin mcGuinness with a Sean Gallagher that is 29.6%?" }, { "role": "assistant", "content": "SELECT \"martin_mc_guinness\" FROM \"first_preference_votes_by_constituency\" WHERE \"se_n_gallagher\"='29.6%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_preference_votes_by_constituency\" (\n \"constituency\" text,\n \"michael_d_higgins\" text,\n \"se_n_gallagher\" text,\n \"martin_mc_guinness\" text,\n \"gay_mitchell\" text,\n \"david_norris\" text,\n \"dana_rosemary_scallon\" text,\n \"mary_davis\" text\n);\n\nQuestion: What is the David Norris with a Michael D. Higgins that is 46.2%?" }, { "role": "assistant", "content": "SELECT \"david_norris\" FROM \"first_preference_votes_by_constituency\" WHERE \"michael_d_higgins\"='46.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_preference_votes_by_constituency\" (\n \"constituency\" text,\n \"michael_d_higgins\" text,\n \"se_n_gallagher\" text,\n \"martin_mc_guinness\" text,\n \"gay_mitchell\" text,\n \"david_norris\" text,\n \"dana_rosemary_scallon\" text,\n \"mary_davis\" text\n);\n\nQuestion: What is the Mary Davis with a Gay Mitchell that is 4.6%?" }, { "role": "assistant", "content": "SELECT \"mary_davis\" FROM \"first_preference_votes_by_constituency\" WHERE \"gay_mitchell\"='4.6%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fide_january_2008_top_ten\" (\n \"rank\" real,\n \"prev\" real,\n \"player\" text,\n \"rating\" real,\n \"chng\" text\n);\n\nQuestion: Can you tell me the total number of Prev that has the Chng of +10, and the Rating larger than 2765?" }, { "role": "assistant", "content": "SELECT COUNT(\"prev\") FROM \"fide_january_2008_top_ten\" WHERE \"chng\"='+10' AND \"rating\">2765;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1832_1885\" (\n \"election\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text,\n \"third_member\" text,\n \"third_party\" text\n);\n\nQuestion: Who is the second member for the Second Party Liberal, and the Third Party Conservative, after the 1841 election?" }, { "role": "assistant", "content": "SELECT \"second_member\" FROM \"1832_1885\" WHERE \"second_party\"='liberal' AND \"third_party\"='conservative' AND \"election\">1841;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1832_1885\" (\n \"election\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text,\n \"third_member\" text,\n \"third_party\" text\n);\n\nQuestion: Who is the third member of the Liberal Party, a third party conservative, the second member Humphrey Mildmay?" }, { "role": "assistant", "content": "SELECT \"third_member\" FROM \"1832_1885\" WHERE \"second_party\"='liberal' AND \"third_party\"='conservative' AND \"second_member\"='humphrey mildmay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1832_1885\" (\n \"election\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text,\n \"third_member\" text,\n \"third_party\" text\n);\n\nQuestion: Who is the third member of the third conservative party, and the second liberal party?" }, { "role": "assistant", "content": "SELECT \"third_member\" FROM \"1832_1885\" WHERE \"third_party\"='conservative' AND \"second_party\"='liberal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1832_1885\" (\n \"election\" real,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text,\n \"third_member\" text,\n \"third_party\" text\n);\n\nQuestion: What was the highest election with third party member Sir Robert Price, BT, and first party member conservative?" }, { "role": "assistant", "content": "SELECT MAX(\"election\") FROM \"1832_1885\" WHERE \"third_member\"='sir robert price, bt' AND \"first_party\"='conservative';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" real,\n \"team\" text,\n \"conference\" text,\n \"head_coach\" text,\n \"record\" text\n);\n\nQuestion: What was the record of the team with head coach Steve Spurrier?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"winners\" WHERE \"head_coach\"='steve spurrier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" real,\n \"team\" text,\n \"conference\" text,\n \"head_coach\" text,\n \"record\" text\n);\n\nQuestion: What was USC's record before the 1967 season?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"winners\" WHERE \"team\"='usc' AND \"season\"<1967;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" real,\n \"team\" text,\n \"conference\" text,\n \"head_coach\" text,\n \"record\" text\n);\n\nQuestion: What was the record during the 1973 season?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"winners\" WHERE \"season\"=1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_scores_of_all_couples\" (\n \"rank_by_average\" text,\n \"place\" text,\n \"perfect_40s\" text,\n \"total\" text,\n \"number_of_dances\" text,\n \"season\" text,\n \"average\" text\n);\n\nQuestion: What is the average score for 6th place with a total of 165?" }, { "role": "assistant", "content": "SELECT \"average\" FROM \"average_scores_of_all_couples\" WHERE \"place\"='6th' AND \"total\"='165';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_scores_of_all_couples\" (\n \"rank_by_average\" text,\n \"place\" text,\n \"perfect_40s\" text,\n \"total\" text,\n \"number_of_dances\" text,\n \"season\" text,\n \"average\" text\n);\n\nQuestion: What is the total with a 74 rank by average for 8th place?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"average_scores_of_all_couples\" WHERE \"rank_by_average\"='74' AND \"place\"='8th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_scores_of_all_couples\" (\n \"rank_by_average\" text,\n \"place\" text,\n \"perfect_40s\" text,\n \"total\" text,\n \"number_of_dances\" text,\n \"season\" text,\n \"average\" text\n);\n\nQuestion: What was the place in season 8 with a rank by average at 139?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"average_scores_of_all_couples\" WHERE \"season\"='8' AND \"rank_by_average\"='139';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_scores_of_all_couples\" (\n \"rank_by_average\" text,\n \"place\" text,\n \"perfect_40s\" text,\n \"total\" text,\n \"number_of_dances\" text,\n \"season\" text,\n \"average\" text\n);\n\nQuestion: What is the total for 3rd place on season 9?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"average_scores_of_all_couples\" WHERE \"place\"='3rd' AND \"season\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_scores_of_all_couples\" (\n \"rank_by_average\" text,\n \"place\" text,\n \"perfect_40s\" text,\n \"total\" text,\n \"number_of_dances\" text,\n \"season\" text,\n \"average\" text\n);\n\nQuestion: What rank by average has 1 dance on season 9?" }, { "role": "assistant", "content": "SELECT \"rank_by_average\" FROM \"average_scores_of_all_couples\" WHERE \"number_of_dances\"='1' AND \"season\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real,\n \"first_round\" text,\n \"final_round\" text\n);\n\nQuestion: What was the final round score for the player from the Milwaukee Bucks?" }, { "role": "assistant", "content": "SELECT \"final_round\" FROM \"contestants\" WHERE \"team\"='milwaukee bucks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real,\n \"first_round\" text,\n \"final_round\" text\n);\n\nQuestion: What position does the player with a first round score of 35.7 play?" }, { "role": "assistant", "content": "SELECT \"pos\" FROM \"contestants\" WHERE \"first_round\"='35.7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real,\n \"first_round\" text,\n \"final_round\" text\n);\n\nQuestion: What is the height of the player with a first round score of 44.1?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"contestants\" WHERE \"first_round\"='44.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real,\n \"first_round\" text,\n \"final_round\" text\n);\n\nQuestion: Which player weighs 187 pounds?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"contestants\" WHERE \"weight\"=187;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_kurt_maschler_award\" (\n \"year\" real,\n \"author\" text,\n \"illustrator\" text,\n \"title\" text,\n \"publisher\" text\n);\n\nQuestion: Who was the illustrator in 1987?" }, { "role": "assistant", "content": "SELECT \"illustrator\" FROM \"winners_of_the_kurt_maschler_award\" WHERE \"year\"=1987;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_kurt_maschler_award\" (\n \"year\" real,\n \"author\" text,\n \"illustrator\" text,\n \"title\" text,\n \"publisher\" text\n);\n\nQuestion: How many years was the title drop dead?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"winners_of_the_kurt_maschler_award\" WHERE \"title\"='drop dead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_kurt_maschler_award\" (\n \"year\" real,\n \"author\" text,\n \"illustrator\" text,\n \"title\" text,\n \"publisher\" text\n);\n\nQuestion: Which publisher has a title of drop dead?" }, { "role": "assistant", "content": "SELECT \"publisher\" FROM \"winners_of_the_kurt_maschler_award\" WHERE \"title\"='drop dead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What Greek word means the same thing as the German word ebbe?" }, { "role": "assistant", "content": "SELECT \"greek\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"german\"='ebbe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What word in German translates into the Icelandic word efja?" }, { "role": "assistant", "content": "SELECT \"german\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"icelandic\"='efja';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What is the Dutch translation of the Latin word navigo?" }, { "role": "assistant", "content": "SELECT \"dutch\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"latin\"='navigo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What Dutch word has the same meaning as the Greek word \u03c0\u03bb\u03ad\u03c9 (pl\u00e9\u014d)?" }, { "role": "assistant", "content": "SELECT \"dutch\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"greek\"='\u03c0\u03bb\u03ad\u03c9 (pl\u00e9\u014d)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"words_derived_from_non_indo_european_lan\" (\n \"english\" text,\n \"german\" text,\n \"dutch\" text,\n \"icelandic\" text,\n \"latin\" text,\n \"greek\" text,\n \"russian\" text\n);\n\nQuestion: What English word has the same meaning as the German word \"german\"?" }, { "role": "assistant", "content": "SELECT \"english\" FROM \"words_derived_from_non_indo_european_lan\" WHERE \"german\"='german';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many wins are related to events of 7 and more than 2 top-10s?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"summary\" WHERE \"events\"=7 AND \"top_10\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the most cuts made for events with 1 top-5, 2 top-10s, and more than 13 total events?" }, { "role": "assistant", "content": "SELECT MAX(\"cuts_made\") FROM \"summary\" WHERE \"top_5\"=1 AND \"top_10\"=2 AND \"events\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" text,\n \"source\" text,\n \"year\" real\n);\n\nQuestion: Can you tell me the Name that has the Rank smaller than 71, and the Year larger than 2005, and the Out of 220?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"rankings\" WHERE \"rank\"<71 AND \"year\">2005 AND \"out_of\"='220';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" text,\n \"source\" text,\n \"year\" real\n);\n\nQuestion: Can you tell me the lowest Year that has the Rank smaller the 132, and the Name of biodiversity richness?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"rankings\" WHERE \"rank\"<132 AND \"name\"='biodiversity richness';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" text,\n \"source\" text,\n \"year\" real\n);\n\nQuestion: Can you tell me the Source that has the Rank of 78?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"rankings\" WHERE \"rank\"=78;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" text,\n \"source\" text,\n \"year\" real\n);\n\nQuestion: Can you tell me the Out of that has the Source of united nations, and the Rank larger than 47, and the Year smaller than 2003?" }, { "role": "assistant", "content": "SELECT \"out_of\" FROM \"rankings\" WHERE \"source\"='united nations' AND \"rank\">47 AND \"year\"<2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text\n);\n\nQuestion: Which Tournament has a 2004 of 1r?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2004\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text\n);\n\nQuestion: What is the 2005 that has a grand slam tournaments in 2007?" }, { "role": "assistant", "content": "SELECT \"2005\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text\n);\n\nQuestion: What is the 2006 that has a 2r in 2004, and a 2r in 2005?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"doubles_performance_timeline\" WHERE \"2004\"='2r' AND \"2005\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text\n);\n\nQuestion: What is the 2007 that has a grand slam tournaments in 2006." }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"doubles_performance_timeline\" WHERE \"2006\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text\n);\n\nQuestion: What is the 2004 that has a of grand slam tournaments in2006 ?" }, { "role": "assistant", "content": "SELECT \"2004\" FROM \"doubles_performance_timeline\" WHERE \"2006\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text\n);\n\nQuestion: What is 2006 has a 2007 of 3r?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_domestic_destinations_out_of_btv_oct\" (\n \"rank\" real,\n \"city\" text,\n \"airport\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: What was the number of passengers going to MCO with a rank larger than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"passengers\") FROM \"top_domestic_destinations_out_of_btv_oct\" WHERE \"airport\"='mco' AND \"rank\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_domestic_destinations_out_of_btv_oct\" (\n \"rank\" real,\n \"city\" text,\n \"airport\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: What was the airport with primary carrier of US Airways with a 2 ranking and more than 51,000 passengers?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"top_domestic_destinations_out_of_btv_oct\" WHERE \"passengers\">'51,000' AND \"carriers\"='us airways' AND \"rank\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_domestic_destinations_out_of_btv_oct\" (\n \"rank\" real,\n \"city\" text,\n \"airport\" text,\n \"passengers\" real,\n \"carriers\" text\n);\n\nQuestion: What city had a rank before 3 and primary carrier JetBlue Airways?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"top_domestic_destinations_out_of_btv_oct\" WHERE \"rank\"<3 AND \"carriers\"='jetblue airways';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1818_1821_orders\" (\n \"name\" text,\n \"built_by_hm_dockyard\" text,\n \"ordered\" text,\n \"laid_down\" text,\n \"launched\" text\n);\n\nQuestion: What was launched and laid down in February 1819?" }, { "role": "assistant", "content": "SELECT \"launched\" FROM \"1818_1821_orders\" WHERE \"laid_down\"='february 1819';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_f3_challenge\" (\n \"pos\" real,\n \"driver\" text,\n \"qualifying\" real,\n \"race_1\" text,\n \"race_2\" text,\n \"race_3\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of positions with less than 10 points, more than 7 qualifying, ret value in Race 1, and Jonathan Grant driving?" }, { "role": "assistant", "content": "SELECT COUNT(\"pos\") FROM \"indy_f3_challenge\" WHERE \"points\"<10 AND \"qualifying\">7 AND \"race_1\"='ret' AND \"driver\"='jonathan grant';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_b\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Date, when Set 2 is 25-13?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"results_pool_b\" WHERE \"set_2\"='25-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_b\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Total, when Set 5 is NA, and when Set 2 is 25-13?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"results_pool_b\" WHERE \"set_5\"='na' AND \"set_2\"='25-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_b\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Score, when Date is Jun 16, and when Set 4 is 25-20?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"results_pool_b\" WHERE \"date\"='jun 16' AND \"set_4\"='25-20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_b\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Set 2, when Score is 3-0, when Date is May 11, and when Set 1 is 25-20?" }, { "role": "assistant", "content": "SELECT \"set_2\" FROM \"results_pool_b\" WHERE \"score\"='3-0' AND \"date\"='may 11' AND \"set_1\"='25-20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_b\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Set 4, when Set 1 is 25-18, and when Date is Jun 2?" }, { "role": "assistant", "content": "SELECT \"set_4\" FROM \"results_pool_b\" WHERE \"set_1\"='25-18' AND \"date\"='jun 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Team with a Score that is w 101\u201397 (2ot)?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"score\"='w 101\u201397 (2ot)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the High points with a Score that is l 64\u201394 (ot)?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"score\"='l 64\u201394 (ot)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the largest played when the drawn is less than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"campeonato_paulista\" WHERE \"drawn\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What points average has a played greater than 20?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"campeonato_paulista\" WHERE \"played\">20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the smallest drawn with a position bigger than 10 and a played less than 20?" }, { "role": "assistant", "content": "SELECT MIN(\"drawn\") FROM \"campeonato_paulista\" WHERE \"position\">10 AND \"played\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: At what average position is the drawn 9 and the points greater than 25?" }, { "role": "assistant", "content": "SELECT AVG(\"position\") FROM \"campeonato_paulista\" WHERE \"drawn\"=9 AND \"points\">25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many played has an against greater than 57 and a lost bigger than 14?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"campeonato_paulista\" WHERE \"against\">57 AND \"lost\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: The event rip curl pro mademoiselle is in which location?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tournaments\" WHERE \"event\"='rip curl pro mademoiselle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: On the date november 24-december 6 what's the winner when the country is united states?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"tournaments\" WHERE \"country\"='united states' AND \"date\"='november 24-december 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: Which year was the 100 m event played in Thessaloniki, Greece?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"major_competition_record\" WHERE \"event\"='100 m' AND \"venue\"='thessaloniki, greece';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: Which position was the World Indoor Championships in a year later than 2008?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"major_competition_record\" WHERE \"competition\"='world indoor championships' AND \"year\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What position was played at the World Athletics Final Competition in a year more recent than 2008?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"major_competition_record\" WHERE \"competition\"='world athletics final' AND \"year\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What position was played at the World Athletics Final Competition in a year more recent than 2008?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"major_competition_record\" WHERE \"competition\"='world athletics final' AND \"year\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"some_differences_in_relation_to_later_ed\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Greater Doubles, when Doubles, I Class is 23, and when Doubles, II Class is less than 27?" }, { "role": "assistant", "content": "SELECT MIN(\"greater_doubles\") FROM \"some_differences_in_relation_to_later_ed\" WHERE \"doubles_i_class\"=23 AND \"doubles_ii_class\"<27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"some_differences_in_relation_to_later_ed\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: What is the highest Doubles, II Class, when Doubles, I Class is less than 19?" }, { "role": "assistant", "content": "SELECT MAX(\"doubles_ii_class\") FROM \"some_differences_in_relation_to_later_ed\" WHERE \"doubles_i_class\"<19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"some_differences_in_relation_to_later_ed\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Semidoubles, when Doubles, II Class is 18, and when Total is less than 164?" }, { "role": "assistant", "content": "SELECT MIN(\"semidoubles\") FROM \"some_differences_in_relation_to_later_ed\" WHERE \"doubles_ii_class\"=18 AND \"total\"<164;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"some_differences_in_relation_to_later_ed\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Date, when Doubles, II Class is 18, and when Total is less than 164?" }, { "role": "assistant", "content": "SELECT MIN(\"date\") FROM \"some_differences_in_relation_to_later_ed\" WHERE \"doubles_ii_class\"=18 AND \"total\"<164;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"college\" (\n \"year\" text,\n \"team\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What are the goals of the assists of 5?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"college\" WHERE \"assists\"='5';" } ]