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 \"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's the listed average of Cuts made that has a Top-5 of 3, and a Top-10 that's smaller than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"cuts_made\") FROM \"summary\" WHERE \"top_5\"=3 AND \"top_10\"<5;" } ]
[ { "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's the sum of Top-25 that has an Events that is smaller than 10?" }, { "role": "assistant", "content": "SELECT COUNT(\"top_25\") FROM \"summary\" WHERE \"events\"<10;" } ]
[ { "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's the sum of Top-10 that has Events that's larger than 16, and has a Top-5 that's also larger than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"top_10\") FROM \"summary\" WHERE \"events\">16 AND \"top_5\">5;" } ]
[ { "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 lowest Cuts made that has a Tournament of PGA Championship, and has a Top-5 that is smaller than 2?" }, { "role": "assistant", "content": "SELECT MIN(\"cuts_made\") FROM \"summary\" WHERE \"tournament\"='pga championship' AND \"top_5\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"humanitas_prize\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: When the nominee(s) is john wells what is the episode for a year before 2004?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"humanitas_prize\" WHERE \"year\"<2004 AND \"nominee_s\"='john wells';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"humanitas_prize\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What is the result when the nominee(s) of janine sherman?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"humanitas_prize\" WHERE \"nominee_s\"='janine sherman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"humanitas_prize\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What is the result for a year after 2003, when the nominee(s) is john wells?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"humanitas_prize\" WHERE \"year\">2003 AND \"nominee_s\"='john wells';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"humanitas_prize\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What is the earliest year with a result of nominated, and a nominee(s) of john wells, for an episode of \"makemba\"?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"humanitas_prize\" WHERE \"result\"='nominated' AND \"nominee_s\"='john wells' AND \"episode\"='\\\"makemba\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_allaire_du_pont_distaff_s\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What is the purse in 2003, which had a 1-1/16 distance?" }, { "role": "assistant", "content": "SELECT \"purse\" FROM \"winners_of_the_allaire_du_pont_distaff_s\" WHERE \"distance\"='1-1/16' AND \"year\"=2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_allaire_du_pont_distaff_s\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: Who is the trainer of the winner skylighter?" }, { "role": "assistant", "content": "SELECT \"trainer\" FROM \"winners_of_the_allaire_du_pont_distaff_s\" WHERE \"winner\"='skylighter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_allaire_du_pont_distaff_s\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What is the distance with a 1:46.32 time?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"winners_of_the_allaire_du_pont_distaff_s\" WHERE \"time\"='1:46.32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_allaire_du_pont_distaff_s\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What is the average year with a 1:42.85 time?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"winners_of_the_allaire_du_pont_distaff_s\" WHERE \"time\"='1:42.85';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_of_the_allaire_du_pont_distaff_s\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What is the distance in 2006?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"winners_of_the_allaire_du_pont_distaff_s\" WHERE \"year\"=2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1937\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: Who was the director of Clean Pastures?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"1937\" WHERE \"title\"='clean pastures';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1937\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What was the release date for Production Number 8181?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1937\" WHERE \"production_num\"='8181';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1937\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What series was directed by Frank Tashlin and has the production number, 8053?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1937\" WHERE \"director\"='frank tashlin' AND \"production_num\"='8053';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1937\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What series was called Egghead Rides Again?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1937\" WHERE \"title\"='egghead rides again';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Tie no of the Port Vale Away game?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"away_team\"='port vale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Score of the Halifax Town Home game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='halifax town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Score of the Scarborough Home game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='scarborough';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seventeenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college did the player who went to the Boston Patriots go to?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"seventeenth_round\" WHERE \"team\"='boston patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seventeenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the highest pick number of the player who went to LSU in college?" }, { "role": "assistant", "content": "SELECT MAX(\"pick\") FROM \"seventeenth_round\" WHERE \"college\"='lsu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seventeenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college did the player picked number 136 go to?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"seventeenth_round\" WHERE \"pick\"=136;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seventeenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college did the player picked larger than 130 by the New York Jets go to?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"seventeenth_round\" WHERE \"pick\">130 AND \"team\"='new york jets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What lane was Emily Seebohm in?" }, { "role": "assistant", "content": "SELECT COUNT(\"lane\") FROM \"semifinal_2\" WHERE \"name\"='emily seebohm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passenger_and_express_train_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"axle_arrangement\" text\n);\n\nQuestion: What is the quantity for railway 263?" }, { "role": "assistant", "content": "SELECT \"quantity\" FROM \"passenger_and_express_train_locomotives\" WHERE \"railway_number_s\"='263';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passenger_and_express_train_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"axle_arrangement\" text\n);\n\nQuestion: What are the year(s) of manufacture for railway number(s) 26 (ii) \u202663 (ii) , 188\u2013193?" }, { "role": "assistant", "content": "SELECT \"year_s_of_manufacture\" FROM \"passenger_and_express_train_locomotives\" WHERE \"railway_number_s\"='26 (ii) \u202663 (ii) , 188\u2013193';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passenger_and_express_train_locomotives\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity\" real,\n \"year_s_of_manufacture\" text,\n \"axle_arrangement\" text\n);\n\nQuestion: What are the railway number(s) for year(s) of manufacture of 1905\u20131906?" }, { "role": "assistant", "content": "SELECT \"railway_number_s\" FROM \"passenger_and_express_train_locomotives\" WHERE \"year_s_of_manufacture\"='1905\u20131906';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the rb player from team oakland?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round\" WHERE \"position\"='rb' AND \"team\"='oakland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the team of the player from ohio state?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"first_round\" WHERE \"college\"='ohio state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rank\" real,\n \"heat\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real\n);\n\nQuestion: What is the highest rank in Uzbekistan with a time larger than 11.44?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"round_1\" WHERE \"country\"='uzbekistan' AND \"time\">11.44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rank\" real,\n \"heat\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real\n);\n\nQuestion: What is the average heat ranked at 30?" }, { "role": "assistant", "content": "SELECT AVG(\"heat\") FROM \"round_1\" WHERE \"rank\"=30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rank\" real,\n \"heat\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real\n);\n\nQuestion: What is the average time in a rank of 61?" }, { "role": "assistant", "content": "SELECT AVG(\"time\") FROM \"round_1\" WHERE \"rank\"=61;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rookie_rallye_modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: How much Capacity has a Vehicle of 2003 holden commodore ute?" }, { "role": "assistant", "content": "SELECT COUNT(\"capacity\") FROM \"rookie_rallye_modern_competition\" WHERE \"vehicle\"='2003 holden commodore ute';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rookie_rallye_modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: Which Navigator has a Total Time of 08:29?" }, { "role": "assistant", "content": "SELECT \"navigator\" FROM \"rookie_rallye_modern_competition\" WHERE \"total_time\"='08:29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rookie_rallye_modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: Which Capacity has a Class of cm22, and a Vehicle of 1999 subaru impreza wrx sti?" }, { "role": "assistant", "content": "SELECT MIN(\"capacity\") FROM \"rookie_rallye_modern_competition\" WHERE \"class\"='cm22' AND \"vehicle\"='1999 subaru impreza wrx sti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rookie_rallye_modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: Which Driver has a Capacity smaller than 5700, and a Total Time of 08:29?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"rookie_rallye_modern_competition\" WHERE \"capacity\"<5700 AND \"total_time\"='08:29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of losses for teams with more than 0 byes?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"2009_ladder\" WHERE \"byes\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the sum of draws for teams with against of 1731 and under 10 losses?" }, { "role": "assistant", "content": "SELECT SUM(\"draws\") FROM \"2009_ladder\" WHERE \"against\"=1731 AND \"losses\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1956\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: When was Tree Cornered Tweety, directed by Friz Freleng, released?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1956\" WHERE \"director\"='friz freleng' AND \"title\"='tree cornered tweety';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1956\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: When was Too Hop to Handle released?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1956\" WHERE \"title\"='too hop to handle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1956\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: From which series is the title Barbary Coast Bunny?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1956\" WHERE \"title\"='barbary coast bunny';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"online_voting_19_30_january_2009\" (\n \"artist\" text,\n \"song\" text,\n \"lyrics_l_music_m\" text,\n \"votes\" text,\n \"place\" text\n);\n\nQuestion: Who did the Lyrics (l) / Music (m) for the song in 23 Place?" }, { "role": "assistant", "content": "SELECT \"lyrics_l_music_m\" FROM \"online_voting_19_30_january_2009\" WHERE \"place\"='23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"online_voting_19_30_january_2009\" (\n \"artist\" text,\n \"song\" text,\n \"lyrics_l_music_m\" text,\n \"votes\" text,\n \"place\" text\n);\n\nQuestion: What are the Votes for the Song by Artist Filipa Batista?" }, { "role": "assistant", "content": "SELECT \"votes\" FROM \"online_voting_19_30_january_2009\" WHERE \"artist\"='filipa batista';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"online_voting_19_30_january_2009\" (\n \"artist\" text,\n \"song\" text,\n \"lyrics_l_music_m\" text,\n \"votes\" text,\n \"place\" text\n);\n\nQuestion: What is the Votes for the Song in Place 9?" }, { "role": "assistant", "content": "SELECT \"votes\" FROM \"online_voting_19_30_january_2009\" WHERE \"place\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"online_voting_19_30_january_2009\" (\n \"artist\" text,\n \"song\" text,\n \"lyrics_l_music_m\" text,\n \"votes\" text,\n \"place\" text\n);\n\nQuestion: What is the Artist of the Song \"Procuro-Me Em Mim\"?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"online_voting_19_30_january_2009\" WHERE \"song\"='\\\"procuro-me em mim\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"online_voting_19_30_january_2009\" (\n \"artist\" text,\n \"song\" text,\n \"lyrics_l_music_m\" text,\n \"votes\" text,\n \"place\" text\n);\n\nQuestion: What is the Artist of the Song with a Place of withdrawn?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"online_voting_19_30_january_2009\" WHERE \"place\"='withdrawn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which week had a result of L 38-21?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"result\"='l 38-21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent after week 8 that had 72,190 people in attendance?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">8 AND \"attendance\"='72,190';" } ]
[ { "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 Gold Medal in Moscow after the year 1982?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"world_championships_men\" WHERE \"year\">1982 AND \"place\"='moscow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total that has a rank less than 8, a silver greater than 6, and 20 as the bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"women\" WHERE \"rank\"<8 AND \"silver\">6 AND \"bronze\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average silver that has a gold greater than 3, with soviet union (urs) as the nation, and a bronze greater than 26?" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"women\" WHERE \"gold\">3 AND \"nation\"='soviet union (urs)' AND \"bronze\">26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest silver that has 57 as the total, with a bronze greater than 20?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"women\" WHERE \"total\"=57 AND \"bronze\">20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What rank has a gold greater than 0, 0 as the bronze, with germany (ger) as the nation?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"women\" WHERE \"gold\">0 AND \"bronze\"=0 AND \"nation\"='germany (ger)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronzes have 1 as the total, with spain (esp) as the nation, and a gold greater than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"bronze\") FROM \"women\" WHERE \"total\"=1 AND \"nation\"='spain (esp)' AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_31_s_ultra_prominent_summit_of_papua\" (\n \"rank\" real,\n \"peak\" text,\n \"country\" text,\n \"island\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: Which Prominence (m) has a Peak of nakanai mountains high point, and an Elevation (m) smaller than 2,316?" }, { "role": "assistant", "content": "SELECT AVG(\"prominence_m\") FROM \"the_31_s_ultra_prominent_summit_of_papua\" WHERE \"peak\"='nakanai mountains high point' AND \"elevation_m\"<'2,316';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"the_31_s_ultra_prominent_summit_of_papua\" (\n \"rank\" real,\n \"peak\" text,\n \"country\" text,\n \"island\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: How much Col (m) has a Prominence (m) larger than 1,897, and a Rank smaller than 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"col_m\") FROM \"the_31_s_ultra_prominent_summit_of_papua\" WHERE \"prominence_m\">'1,897' AND \"rank\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What position Jason Fitzgerald played?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"supplemental_first_round_selections\" WHERE \"player\"='jason fitzgerald';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: Jason Romano played for what team?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"supplemental_first_round_selections\" WHERE \"player\"='jason romano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_amplifier_models\" (\n \"model\" text,\n \"poweramp\" text,\n \"dimensions\" text,\n \"mass\" text,\n \"form_factor_s\" text,\n \"output\" text\n);\n\nQuestion: What are the dimensions of the amp with a 180W output?" }, { "role": "assistant", "content": "SELECT \"dimensions\" FROM \"current_amplifier_models\" WHERE \"output\"='180w';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: Which player was from Fermanagh and had an average score of 22?" }, { "role": "assistant", "content": "SELECT AVG(\"average\") FROM \"top_scorers\" WHERE \"total\"=22 AND \"county\"='fermanagh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: How many total points did Oisin McConville have from his 5 matches?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"top_scorers\" WHERE \"player\"='oisin mcconville' AND \"matches\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many attendances have October 30, 1977 as the date, with a week greater than 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"date\"='october 30, 1977' AND \"week\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest attendance that has l 42-35 as the result, with a week less than 13?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"result\"='l 42-35' AND \"week\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Who is from south korea and has a heat less than 3?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"heats\" WHERE \"heat\"<3 AND \"nationality\"='south korea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the highest heat of the athlete from spain with a lane less than 7?" }, { "role": "assistant", "content": "SELECT MAX(\"heat\") FROM \"heats\" WHERE \"nationality\"='spain' AND \"lane\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the average lane of the athlete from japan with a time of 4:37.35 and a heat less than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"lane\") FROM \"heats\" WHERE \"nationality\"='japan' AND \"time\"='4:37.35' AND \"heat\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Gold count if the Bronze is 4 and Silver is greater than 5?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table_by_country\" WHERE \"bronze\"=4 AND \"silver\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the Average for Silver medals that have more than 17 Golds?" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"medal_table_by_country\" WHERE \"gold\">17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of Silver medals with a Total greater than 14 and more than 15 Bronze medals?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table_by_country\" WHERE \"total\">14 AND \"bronze\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_songs_in_telugu\" (\n \"year\" real,\n \"song_title\" text,\n \"film\" text,\n \"co_singer\" text,\n \"music_director\" text\n);\n\nQuestion: Who is the music-director for the song from the film khaleja who had a co-singer of hemachandra?" }, { "role": "assistant", "content": "SELECT \"music_director\" FROM \"best_songs_in_telugu\" WHERE \"co_singer\"='hemachandra' AND \"film\"='khaleja';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_songs_in_telugu\" (\n \"year\" real,\n \"song_title\" text,\n \"film\" text,\n \"co_singer\" text,\n \"music_director\" text\n);\n\nQuestion: What is the film from 2013 with a song title of \"neetho edo\" with a solo co-singer?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"best_songs_in_telugu\" WHERE \"year\"=2013 AND \"co_singer\"='solo' AND \"song_title\"='\\\"neetho edo\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"date\" text,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text,\n \"att\" real\n);\n\nQuestion: What was the score for the matchup having attendance of 354?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"past_winners\" WHERE \"att\"=354;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists_per_nation\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation had a medal total of less than 10, less than 1 bronze medal, in rank 11?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medalists_per_nation\" WHERE \"total\"<10 AND \"bronze\"<1 AND \"rank\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists_per_nation\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals did the team that won a total of 10 medals and 3 silver medals win?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"medalists_per_nation\" WHERE \"silver\"=3 AND \"total\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists_per_nation\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of medals won by teams that won more than 11 bronze medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medalists_per_nation\" WHERE \"bronze\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the lowest react of the athlete from the United States who has a lane less than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"react\") FROM \"semifinal_1\" WHERE \"country\"='united states' AND \"lane\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the lowest of the athlete from sri lanka who has a lane greater than 8?" }, { "role": "assistant", "content": "SELECT MIN(\"react\") FROM \"semifinal_1\" WHERE \"country\"='sri lanka' AND \"lane\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the average react of athlete muna lee, who is ranked greater than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"react\") FROM \"semifinal_1\" WHERE \"athlete\"='muna lee' AND \"rank\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the average lane of the athlete from cuba who has a time greater than 22.57 and react less than 0.245?" }, { "role": "assistant", "content": "SELECT AVG(\"lane\") FROM \"semifinal_1\" WHERE \"time\">22.57 AND \"react\"<0.245 AND \"country\"='cuba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the average react of the athlete with a time less than 22.29 and a rank greater than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"react\") FROM \"semifinal_1\" WHERE \"time\"<22.29 AND \"rank\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the Opponent on December 7, 2003?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='december 7, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Tv Time of the game with an Attendance of 73,578?" }, { "role": "assistant", "content": "SELECT \"tv_time\" FROM \"schedule\" WHERE \"attendance\"='73,578';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"reaction_time\" real,\n \"result\" real\n);\n\nQuestion: What is the highest result for Wallace Spearmon when the reaction time is greater than 0.167?" }, { "role": "assistant", "content": "SELECT MAX(\"result\") FROM \"final\" WHERE \"name\"='wallace spearmon' AND \"reaction_time\">0.167;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"reaction_time\" real,\n \"result\" real\n);\n\nQuestion: What was the result for Lane 3?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"final\" WHERE \"lane\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"reaction_time\" real,\n \"result\" real\n);\n\nQuestion: What is the lowest result for Christian Malcolm with a reaction time greater than 0.185 and a lane higher than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"result\") FROM \"final\" WHERE \"reaction_time\">0.185 AND \"name\"='christian malcolm' AND \"lane\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What are the lowest conceded with 1 draw, and a score larger than 14?" }, { "role": "assistant", "content": "SELECT MIN(\"conceded\") FROM \"torneo_clausura\" WHERE \"draws\"=1 AND \"scored\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What are the lowest losses with more than 13 scored, and more than 7 draws?" }, { "role": "assistant", "content": "SELECT MIN(\"losses\") FROM \"torneo_clausura\" WHERE \"scored\">13 AND \"draws\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the average played for less than 8 points?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"torneo_clausura\" WHERE \"points\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"hong_kong\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"scored\" real,\n \"competition\" text\n);\n\nQuestion: What competition has a Result of 1\u20132?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"hong_kong\" WHERE \"result\"='1\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is moving from fee in Hun country?" }, { "role": "assistant", "content": "SELECT \"moving_from\" FROM \"in\" WHERE \"country\"='hun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is thr type in Aut country?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"in\" WHERE \"country\"='aut';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Who is the owner of the radio station that plays adult hits?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"radio\" WHERE \"format\"='adult hits';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the call sign for the radio owned by astral media?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"radio\" WHERE \"owner\"='astral media';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the frequency for the radio owned by bell media with a call sign of chsu-fm?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"radio\" WHERE \"owner\"='bell media' AND \"call_sign\"='chsu-fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What is the branding for the radio with a frequency of 1150 am?" }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"radio\" WHERE \"frequency\"='1150 am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What was the format for the radio with a frequency of 00 96.3 fm?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"radio\" WHERE \"frequency\"='00 96.3 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Who is the owner of the radio frequency of 0 101.5 fm?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"radio\" WHERE \"frequency\"='0 101.5 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: how many times is the name matt targett and the lane higher than 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"time\") FROM \"semifinal_2\" WHERE \"name\"='matt targett' AND \"lane\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: what is the highest time when the rank is less than 5 and the name is eamon sullivan?" }, { "role": "assistant", "content": "SELECT MAX(\"time\") FROM \"semifinal_2\" WHERE \"rank\"<5 AND \"name\"='eamon sullivan';" } ]