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 \"coaches_staff\" (\n \"position\" text,\n \"name\" text,\n \"year_at_cu\" text,\n \"experience\" real,\n \"alma_mater\" text\n);\n\nQuestion: What year at CU is the person in video services with an experience less than 1?" }, { "role": "assistant", "content": "SELECT \"year_at_cu\" FROM \"coaches_staff\" WHERE \"experience\"<1 AND \"position\"='video services';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaches_staff\" (\n \"position\" text,\n \"name\" text,\n \"year_at_cu\" text,\n \"experience\" real,\n \"alma_mater\" text\n);\n\nQuestion: The graduate assistant who was in the 1st year at CU has what experience?" }, { "role": "assistant", "content": "SELECT \"experience\" FROM \"coaches_staff\" WHERE \"year_at_cu\"='1st' AND \"position\"='graduate assistant';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaches_staff\" (\n \"position\" text,\n \"name\" text,\n \"year_at_cu\" text,\n \"experience\" real,\n \"alma_mater\" text\n);\n\nQuestion: What person has the alma mater of Eastern Nazarene ('74), and greater than 19 experience?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"coaches_staff\" WHERE \"experience\">19 AND \"alma_mater\"='eastern nazarene (''74)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"model\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What is the total engine capacity of the a4 transmission, which has an urban mpg-US greater than 19, an mpg-us extra-urban greater than 38.6, and an aveo model?" }, { "role": "assistant", "content": "SELECT COUNT(\"engine_capacity\") FROM \"see_also\" WHERE \"transmission\"='a4' AND \"mpg_us_urban\">19 AND \"mpg_us_extra_urban\">38.6 AND \"model\"='aveo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"model\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What is the highest engine capacity with a bmw manufacturer, an mpg-UK extra-urban of 52.3, a 176 CO 2 g/km, and an mpg-us urban greater than 27.3?" }, { "role": "assistant", "content": "SELECT MAX(\"engine_capacity\") FROM \"see_also\" WHERE \"manufacturer\"='bmw' AND \"mpg_uk_extra_urban\"=52.3 AND \"co_2_g_km\"=176 AND \"mpg_us_urban\">27.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"model\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What is the mpg-uk combined with an mpg-uk urban (cold) greater than 26.6, a m5 transmission, a diesel fuel type, and an engine capacity less than 1560?" }, { "role": "assistant", "content": "SELECT \"mpg_uk_combined\" FROM \"see_also\" WHERE \"mpg_uk_urban_cold\">26.6 AND \"transmission\"='m5' AND \"fuel_type\"='diesel' AND \"engine_capacity\"<1560;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"model\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What is the l/100km urban (cold) with a CO 2 g/km less than 222, an mpg-us urban greater than 17.8, an mpg-uk extra-urban of 55.4, and an engine capacity greater than 1560?" }, { "role": "assistant", "content": "SELECT \"l_100km_urban_cold\" FROM \"see_also\" WHERE \"co_2_g_km\"<222 AND \"mpg_us_urban\">17.8 AND \"mpg_uk_extra_urban\"=55.4 AND \"engine_capacity\">1560;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"manufacturer\" text,\n \"model\" text,\n \"transmission\" text,\n \"engine_capacity\" real,\n \"fuel_type\" text,\n \"l_100km_urban_cold\" real,\n \"l_100km_extra_urban\" real,\n \"l_100km_combined\" real,\n \"mpg_uk_urban_cold\" real,\n \"mpg_uk_extra_urban\" real,\n \"mpg_uk_combined\" real,\n \"mpg_us_urban\" real,\n \"mpg_us_extra_urban\" real,\n \"mpg_us_combined\" real,\n \"co_2_g_km\" real,\n \"green_rating\" text\n);\n\nQuestion: What model has a g green rating, has chrysler jeep as a manufacturer, has an l/100km urban (cold) less than 18, and has an mpg-uk combined of 27.7?" }, { "role": "assistant", "content": "SELECT \"model\" FROM \"see_also\" WHERE \"green_rating\"='g' AND \"manufacturer\"='chrysler jeep' AND \"l_100km_urban_cold\"<18 AND \"mpg_uk_combined\"=27.7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the league cup apps when the total goals is less than 2 and the total apps is 12?" }, { "role": "assistant", "content": "SELECT \"league_cup_apps\" FROM \"appearances_and_goals\" WHERE \"total_goals\"<2 AND \"total_apps\"='12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the average ga cup goals when the league cup apps is 2, the fa cup apps is 3 and the league goals is 3?" }, { "role": "assistant", "content": "SELECT AVG(\"fa_cup_goals\") FROM \"appearances_and_goals\" WHERE \"league_cup_apps\"='2' AND \"fa_cup_apps\"='3' AND \"league_goals\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the highest fa cup goals when flt goals is more than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"fa_cup_goals\") FROM \"appearances_and_goals\" WHERE \"flt_goals\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the total apps when the league apps is 4 (2)?" }, { "role": "assistant", "content": "SELECT \"total_apps\" FROM \"appearances_and_goals\" WHERE \"league_apps\"='4 (2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Silver has a Total larger than 9, and a Gold of 14?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medals_table\" WHERE \"total\">9 AND \"gold\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Rank has a Total larger than 9, and a Gold larger than 6?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"medals_table\" WHERE \"total\">9 AND \"gold\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Silver has a Rank of 4, and a Bronze smaller than 12?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medals_table\" WHERE \"rank\"='4' AND \"bronze\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronzes have a Total of 9?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medals_table\" WHERE \"total\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Gold has a Nation of mongolia, and a Total larger than 18?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medals_table\" WHERE \"nation\"='mongolia' AND \"total\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_the_parliament\" (\n \"lok_sabha\" text,\n \"duration\" text,\n \"name_of_m_p\" text,\n \"party_affiliation\" text,\n \"election_year\" real\n);\n\nQuestion: What is the Lok Sabha for Dravida Munnetra Kazhagam, in 1999-04?" }, { "role": "assistant", "content": "SELECT \"lok_sabha\" FROM \"members_of_the_parliament\" WHERE \"party_affiliation\"='dravida munnetra kazhagam' AND \"duration\"='1999-04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_the_parliament\" (\n \"lok_sabha\" text,\n \"duration\" text,\n \"name_of_m_p\" text,\n \"party_affiliation\" text,\n \"election_year\" real\n);\n\nQuestion: What is the duration when Lok Sabha shows fifth?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"members_of_the_parliament\" WHERE \"lok_sabha\"='fifth';" } ]
[ { "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 was the result for the game played on December 20, 1970?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='december 20, 1970';" } ]
[ { "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 was the result for week 2?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank of the athletes that have Notes of fb, and a Time of 6:47.30?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"semifinal_a_b_2\" WHERE \"notes\"='fb' AND \"time\"='6:47.30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the least rank for athletes with a time of 6:36.65?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"semifinal_a_b_2\" WHERE \"time\"='6:36.65';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the average react for a rank more than 8?" }, { "role": "assistant", "content": "SELECT AVG(\"react\") FROM \"heat_1\" WHERE \"rank\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the highest rank for the react of 0.198, and the time more than 20.42?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"heat_1\" WHERE \"react\"=0.198 AND \"time\">20.42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What is the sum of time with a lane larger than 6, a nationality of canada, and the react smaller than 0.151?" }, { "role": "assistant", "content": "SELECT SUM(\"time\") FROM \"heat_1\" WHERE \"lane\">6 AND \"nationality\"='canada' AND \"react\"<0.151;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ner_associated_genes\" (\n \"human_gene_protein\" text,\n \"mouse_ortholog\" text,\n \"yeast_ortholog\" text,\n \"subpathway\" text,\n \"gene_cards_entry\" text\n);\n\nQuestion: What human gene has a yeast ortholog of RAD26?" }, { "role": "assistant", "content": "SELECT \"human_gene_protein\" FROM \"ner_associated_genes\" WHERE \"yeast_ortholog\"='rad26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ner_associated_genes\" (\n \"human_gene_protein\" text,\n \"mouse_ortholog\" text,\n \"yeast_ortholog\" text,\n \"subpathway\" text,\n \"gene_cards_entry\" text\n);\n\nQuestion: What is the human gene that has a mouse ortholog of LIG1?" }, { "role": "assistant", "content": "SELECT \"human_gene_protein\" FROM \"ner_associated_genes\" WHERE \"mouse_ortholog\"='lig1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ner_associated_genes\" (\n \"human_gene_protein\" text,\n \"mouse_ortholog\" text,\n \"yeast_ortholog\" text,\n \"subpathway\" text,\n \"gene_cards_entry\" text\n);\n\nQuestion: What is the yeast ortholog that has a subpathway of GGR and GeneCards entry CETN2?" }, { "role": "assistant", "content": "SELECT \"yeast_ortholog\" FROM \"ner_associated_genes\" WHERE \"subpathway\"='ggr' AND \"gene_cards_entry\"='cetn2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ner_associated_genes\" (\n \"human_gene_protein\" text,\n \"mouse_ortholog\" text,\n \"yeast_ortholog\" text,\n \"subpathway\" text,\n \"gene_cards_entry\" text\n);\n\nQuestion: What is the yeast ortholog of mouse ortholog MMS19?" }, { "role": "assistant", "content": "SELECT \"yeast_ortholog\" FROM \"ner_associated_genes\" WHERE \"mouse_ortholog\"='mms19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_10_3_titles_7_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Tournament against Vladimir Zednik?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_10_3_titles_7_runner_ups\" WHERE \"opponent\"='vladimir zednik';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_10_3_titles_7_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What Tournament had a Score of 4\u20136, 6\u20137, 3\u20136?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_10_3_titles_7_runner_ups\" WHERE \"score\"='4\u20136, 6\u20137, 3\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_10_3_titles_7_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Score of the of the Tournament against Tim Gullikson with Outcome of runner-up?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_10_3_titles_7_runner_ups\" WHERE \"outcome\"='runner-up' AND \"opponent\"='tim gullikson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"chen_yanqing_chn\" text,\n \"111kg\" text,\n \"doha_qatar\" text\n);\n\nQuestion: What is the Doha, Qatar when the snatch is total?" }, { "role": "assistant", "content": "SELECT \"doha_qatar\" FROM \"records\" WHERE \"snatch\"='total';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"chen_yanqing_chn\" text,\n \"111kg\" text,\n \"doha_qatar\" text\n);\n\nQuestion: What shows for Chen Yanqing (CHN) when Doha, Qatar is \u2014?" }, { "role": "assistant", "content": "SELECT \"chen_yanqing_chn\" FROM \"records\" WHERE \"doha_qatar\"='\u2014';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"chen_yanqing_chn\" text,\n \"111kg\" text,\n \"doha_qatar\" text\n);\n\nQuestion: What is the Doha, Qatar when the snatch is clean & jerk?" }, { "role": "assistant", "content": "SELECT \"doha_qatar\" FROM \"records\" WHERE \"snatch\"='clean & jerk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"points\" real,\n \"name\" text,\n \"club\" text,\n \"tries\" real,\n \"drop\" real\n);\n\nQuestion: Which Points have a Club of london wasps, and a Drop larger than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"top_scorers\" WHERE \"club\"='london wasps' AND \"drop\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"points\" real,\n \"name\" text,\n \"club\" text,\n \"tries\" real,\n \"drop\" real\n);\n\nQuestion: How many Points have a Name of stephen myler, and Tries smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"top_scorers\" WHERE \"name\"='stephen myler' AND \"tries\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"points\" real,\n \"name\" text,\n \"club\" text,\n \"tries\" real,\n \"drop\" real\n);\n\nQuestion: How many drops have Tries smaller than 5, and Points larger than 212?" }, { "role": "assistant", "content": "SELECT COUNT(\"drop\") FROM \"top_scorers\" WHERE \"tries\"<5 AND \"points\">212;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourteenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick number for New Mexico?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"fourteenth_round\" WHERE \"college\"='new mexico';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourteenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What player is from the Denver Broncos?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"fourteenth_round\" WHERE \"team\"='denver broncos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourteenth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college has their team as the New York Jets?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"fourteenth_round\" WHERE \"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 \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2003\" real\n);\n\nQuestion: What is the Constituency Number of Total:?" }, { "role": "assistant", "content": "SELECT \"constituency_number\" FROM \"assembly_segments\" WHERE \"name\"='total:';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2003\" real\n);\n\nQuestion: What is the Constituency Number when the Number of Electorates (2003) is more than 156,910, and Reserved for sc?" }, { "role": "assistant", "content": "SELECT \"constituency_number\" FROM \"assembly_segments\" WHERE \"number_of_electorates_2003\">'156,910' AND \"reserved_for_sc_st_none\"='sc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2003\" real\n);\n\nQuestion: Which District is Constituency number 22?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"constituency_number\"='22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2003\" real\n);\n\nQuestion: What is the lowest number of Electorates (2003) in District bhind, Reserved for none, and Constituency Number 11?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_electorates_2003\") FROM \"assembly_segments\" WHERE \"district\"='bhind' AND \"reserved_for_sc_st_none\"='none' AND \"constituency_number\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school/club had pick 33?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"nfl_draft\" WHERE \"pick\"=33;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What attendance has October 16, 2005 as the date?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='october 16, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What result has a week less than 16, and October 31, 2005 as the date?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<16 AND \"date\"='october 31, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Year has a Manager of bobby dews, and Playoffs of lost in 1st round?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"year_by_year_record\" WHERE \"manager\"='bobby dews' AND \"playoffs\"='lost in 1st round';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: How many years have a Record of 73-65?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"year_by_year_record\" WHERE \"record\"='73-65';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Record has a Year larger than 1974, and a Finish of 3rd?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"year_by_year_record\" WHERE \"year\">1974 AND \"finish\"='3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1961_1995\" (\n \"year\" real,\n \"artist\" text,\n \"song\" text,\n \"uk_chart\" text,\n \"at_eurovision\" text\n);\n\nQuestion: Which Song of the Year was 42 on the UK charts prior to 1994?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"1961_1995\" WHERE \"year\"<1994 AND \"uk_chart\"='42';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1961_1995\" (\n \"year\" real,\n \"artist\" text,\n \"song\" text,\n \"uk_chart\" text,\n \"at_eurovision\" text\n);\n\nQuestion: Where did Scott Fitzgerald rank on the UK charts?" }, { "role": "assistant", "content": "SELECT \"uk_chart\" FROM \"1961_1995\" WHERE \"artist\"='scott fitzgerald';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1961_1995\" (\n \"year\" real,\n \"artist\" text,\n \"song\" text,\n \"uk_chart\" text,\n \"at_eurovision\" text\n);\n\nQuestion: Where did the song by Michael Ball, which placed 2nd in Eurovision prior to 1961, place on the UK charts?" }, { "role": "assistant", "content": "SELECT \"uk_chart\" FROM \"1961_1995\" WHERE \"year\">1961 AND \"at_eurovision\"='2nd' AND \"artist\"='michael ball';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lent_bumps\" (\n \"year\" real,\n \"finish_position\" text,\n \"1st_day\" text,\n \"2nd_day\" text,\n \"3rd_day\" text,\n \"4th_day\" text\n);\n\nQuestion: What is the latest year that ended with a 3rd day of rowed-over?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"lent_bumps\" WHERE \"3rd_day\"='rowed-over';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lent_bumps\" (\n \"year\" real,\n \"finish_position\" text,\n \"1st_day\" text,\n \"2nd_day\" text,\n \"3rd_day\" text,\n \"4th_day\" text\n);\n\nQuestion: What is the 3rd day result for years under 2012 and a finish position of 33rd?" }, { "role": "assistant", "content": "SELECT \"3rd_day\" FROM \"lent_bumps\" WHERE \"year\"<2012 AND \"finish_position\"='33rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lent_bumps\" (\n \"year\" real,\n \"finish_position\" text,\n \"1st_day\" text,\n \"2nd_day\" text,\n \"3rd_day\" text,\n \"4th_day\" text\n);\n\nQuestion: What was the 4th day result for the year in which the 3rd day result was bumped Darwin?" }, { "role": "assistant", "content": "SELECT \"4th_day\" FROM \"lent_bumps\" WHERE \"3rd_day\"='bumped darwin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"luge\" (\n \"position\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"2009_10_team\" text\n);\n\nQuestion: What is the sum of the heights for the Cornell Big Red?" }, { "role": "assistant", "content": "SELECT SUM(\"height_cm\") FROM \"luge\" WHERE \"2009_10_team\"='cornell big red';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"vessel\" text,\n \"origin\" text,\n \"type\" text,\n \"in_service\" real,\n \"unit\" text\n);\n\nQuestion: For the vessel with a listed In service of 1, what is the origin given?" }, { "role": "assistant", "content": "SELECT \"origin\" FROM \"equipment\" WHERE \"in_service\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"vessel\" text,\n \"origin\" text,\n \"type\" text,\n \"in_service\" real,\n \"unit\" text\n);\n\nQuestion: What is the lowest listed In service for a vessel of xavery czernicki class?" }, { "role": "assistant", "content": "SELECT MIN(\"in_service\") FROM \"equipment\" WHERE \"vessel\"='xavery czernicki class';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"vessel\" text,\n \"origin\" text,\n \"type\" text,\n \"in_service\" real,\n \"unit\" text\n);\n\nQuestion: Which vessel has a type of logistic support?" }, { "role": "assistant", "content": "SELECT \"vessel\" FROM \"equipment\" WHERE \"type\"='logistic support';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"vessel\" text,\n \"origin\" text,\n \"type\" text,\n \"in_service\" real,\n \"unit\" text\n);\n\nQuestion: What is the type for a vessel of lublin class?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"equipment\" WHERE \"vessel\"='lublin class';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"vessel\" text,\n \"origin\" text,\n \"type\" text,\n \"in_service\" real,\n \"unit\" text\n);\n\nQuestion: What is the highest In service for a vessel with a listed Unit of 12th minesweeper squadron?" }, { "role": "assistant", "content": "SELECT MAX(\"in_service\") FROM \"equipment\" WHERE \"unit\"='12th minesweeper squadron';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"equipment\" (\n \"vessel\" text,\n \"origin\" text,\n \"type\" text,\n \"in_service\" real,\n \"unit\" text\n);\n\nQuestion: What is the type for a vessel with a listed unit of naval base swinoujscie (auxiliary squadron)?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"equipment\" WHERE \"unit\"='naval base swinoujscie (auxiliary squadron)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_1_newcomers_race_a\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: Which rider was on the 600cc Yamaha team?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"race_1_newcomers_race_a\" WHERE \"team\"='600cc yamaha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_1_newcomers_race_a\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What was John Hildreth's speed?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"race_1_newcomers_race_a\" WHERE \"rider\"='john hildreth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"royal_rumble_entrances_and_eliminations\" (\n \"draw\" real,\n \"entrant\" text,\n \"brand\" text,\n \"order\" text,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: What is the average draw number of an entrant with a time of 22:29?" }, { "role": "assistant", "content": "SELECT AVG(\"draw\") FROM \"royal_rumble_entrances_and_eliminations\" WHERE \"time\"='22:29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"royal_rumble_entrances_and_eliminations\" (\n \"draw\" real,\n \"entrant\" text,\n \"brand\" text,\n \"order\" text,\n \"eliminated_by\" text,\n \"time\" text\n);\n\nQuestion: What is Mark Henry's brand?" }, { "role": "assistant", "content": "SELECT \"brand\" FROM \"royal_rumble_entrances_and_eliminations\" WHERE \"entrant\"='mark henry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"author_editor_source\" text,\n \"year_of_publication\" text,\n \"countries_sampled\" real,\n \"world_ranking_1\" text,\n \"ranking_in_latin_america_2\" real\n);\n\nQuestion: Who is the Author/Editor/Source for more than 100 countries sampled and has a 35 world ranking?" }, { "role": "assistant", "content": "SELECT \"author_editor_source\" FROM \"see_also\" WHERE \"world_ranking_1\"='35' AND \"countries_sampled\">100;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"author_editor_source\" text,\n \"year_of_publication\" text,\n \"countries_sampled\" real,\n \"world_ranking_1\" text,\n \"ranking_in_latin_america_2\" real\n);\n\nQuestion: How many countries sampled has a world ranking of 33 in 2010 and less than 3 ranking in Latin America?" }, { "role": "assistant", "content": "SELECT SUM(\"countries_sampled\") FROM \"see_also\" WHERE \"year_of_publication\"='2010' AND \"world_ranking_1\"='33' AND \"ranking_in_latin_america_2\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"author_editor_source\" text,\n \"year_of_publication\" text,\n \"countries_sampled\" real,\n \"world_ranking_1\" text,\n \"ranking_in_latin_america_2\" real\n);\n\nQuestion: What's the world ranking in 2011 having more than 142 countries sampled, and more than a 3 for ranking in Latin America?" }, { "role": "assistant", "content": "SELECT \"world_ranking_1\" FROM \"see_also\" WHERE \"year_of_publication\"='2011' AND \"ranking_in_latin_america_2\">3 AND \"countries_sampled\">142;" } ]
[ { "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 home team has a tie no of 20?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='20';" } ]
[ { "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 date was the score 3\u20133, and away team was Barnet?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"first_round_proper\" WHERE \"score\"='3\u20133' AND \"away_team\"='barnet';" } ]
[ { "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 when Wimbledon is the home team?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"home_team\"='wimbledon';" } ]
[ { "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 when the Tie no is replay, and the away team is York City?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"tie_no\"='replay' AND \"away_team\"='york city';" } ]
[ { "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 when Chester is the away team?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"away_team\"='chester';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_information\" (\n \"episode_number\" text,\n \"broadcast_date\" text,\n \"title\" text,\n \"written_by\" text,\n \"viewership_millions\" real\n);\n\nQuestion: What is the broadcast date of the episode with 9.65 million viewers?" }, { "role": "assistant", "content": "SELECT \"broadcast_date\" FROM \"episode_information\" WHERE \"viewership_millions\"=9.65;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_information\" (\n \"episode_number\" text,\n \"broadcast_date\" text,\n \"title\" text,\n \"written_by\" text,\n \"viewership_millions\" real\n);\n\nQuestion: What is the lowest viewership in millions of the episode broadcast on 7 September 2001?" }, { "role": "assistant", "content": "SELECT MIN(\"viewership_millions\") FROM \"episode_information\" WHERE \"broadcast_date\"='7 september 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_information\" (\n \"episode_number\" text,\n \"broadcast_date\" text,\n \"title\" text,\n \"written_by\" text,\n \"viewership_millions\" real\n);\n\nQuestion: What is the episode number of the episode broadcast on 21 September 2001?" }, { "role": "assistant", "content": "SELECT \"episode_number\" FROM \"episode_information\" WHERE \"broadcast_date\"='21 september 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: How many times is the points 8 and the place larger than 8?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"results\" WHERE \"points\"=8 AND \"place\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the average draw when the place is 5 and points more than 15?" }, { "role": "assistant", "content": "SELECT AVG(\"draw\") FROM \"results\" WHERE \"place\"=5 AND \"points\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: what is the highest draw when points is less than 11 and language is norwegian?" }, { "role": "assistant", "content": "SELECT MAX(\"draw\") FROM \"results\" WHERE \"points\"<11 AND \"language\"='norwegian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of picks from the PBA team of purefoods tender juicy hotdogs?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"round_2\" WHERE \"pba_team\"='purefoods tender juicy hotdogs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the pba team for the player who went to santo tomas college?" }, { "role": "assistant", "content": "SELECT \"pba_team\" FROM \"round_2\" WHERE \"college\"='santo tomas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the PBA team for roberto jabar who was picked before number 11?" }, { "role": "assistant", "content": "SELECT \"pba_team\" FROM \"round_2\" WHERE \"pick\"<11 AND \"player\"='roberto jabar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fixed_focal_length_lenses\" (\n \"brand\" text,\n \"product_name\" text,\n \"focal_length\" text,\n \"35mm_efl_and_equivalent_aperture\" text,\n \"max_aperture\" text\n);\n\nQuestion: What is the brand of the slr magic hyperprime cine 35mm t0.95, which has a focal length of 35mm?" }, { "role": "assistant", "content": "SELECT \"brand\" FROM \"fixed_focal_length_lenses\" WHERE \"focal_length\"='35mm' AND \"product_name\"='slr magic hyperprime cine 35mm t0.95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What is the Most Spoken language in the Place with Code 70403 with an Area (km 2) larger than 3.79 and a Population larger than 73,283?" }, { "role": "assistant", "content": "SELECT \"most_spoken_language\" FROM \"main_places\" WHERE \"code\">70403 AND \"area_km_2\">3.79 AND \"population\">'73,283';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What is the Population of the Place with an Area (km 2) larger than 498.77?" }, { "role": "assistant", "content": "SELECT COUNT(\"population\") FROM \"main_places\" WHERE \"area_km_2\">498.77;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What is the Population of Tshepiso with a Code of 70409 or smaller and an Area (km 2) smaller than 5.97?" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"main_places\" WHERE \"code\"<70409 AND \"area_km_2\"<5.97 AND \"place\"='tshepiso';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" text,\n \"react\" real\n);\n\nQuestion: What the time of Paul Hession with more than an 0.187 react?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heat_4\" WHERE \"react\">0.187 AND \"athlete\"='paul hession';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" text,\n \"react\" real\n);\n\nQuestion: What's the lane number when time was 20.45 and the react was less than 0.164?" }, { "role": "assistant", "content": "SELECT MAX(\"lane\") FROM \"heat_4\" WHERE \"react\"<0.164 AND \"time\"='20.45';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_tour_results_timeline\" (\n \"1953\" text,\n \"1954\" text,\n \"1955\" text,\n \"1956\" text,\n \"1957\" text,\n \"1958\" text,\n \"1959\" text,\n \"1960\" text,\n \"1961\" text,\n \"1962\" text,\n \"1963\" text\n);\n\nQuestion: what is 1958 when 1957 is 2 and 1956 is 3?" }, { "role": "assistant", "content": "SELECT \"1958\" FROM \"grand_tour_results_timeline\" WHERE \"1957\"='2' AND \"1956\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_tour_results_timeline\" (\n \"1953\" text,\n \"1954\" text,\n \"1955\" text,\n \"1956\" text,\n \"1957\" text,\n \"1958\" text,\n \"1959\" text,\n \"1960\" text,\n \"1961\" text,\n \"1962\" text,\n \"1963\" text\n);\n\nQuestion: what is 1955 when 1961 is n/a?" }, { "role": "assistant", "content": "SELECT \"1955\" FROM \"grand_tour_results_timeline\" WHERE \"1961\"='n/a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date has 7 as the tie no.?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"taekwondo_medals\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which year was held in beijing?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"taekwondo_medals\" WHERE \"venue\"='beijing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"taekwondo_medals\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: How many years had a Venue of eindhoven?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"taekwondo_medals\" WHERE \"venue\"='eindhoven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"taekwondo_medals\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which Competition has a Venue of manchester in 2009?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"taekwondo_medals\" WHERE \"venue\"='manchester' AND \"year\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"taekwondo_medals\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which Year has a Position of 2nd, and Notes of -63kg, and a Venue of manchester?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"taekwondo_medals\" WHERE \"position\"='2nd' AND \"notes\"='-63kg' AND \"venue\"='manchester';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: Name the the Best of rodolfo lav\u00edn" }, { "role": "assistant", "content": "SELECT \"best\" FROM \"qualifying_results\" WHERE \"name\"='rodolfo lav\u00edn';" } ]