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 \"currency\" (\n \"country\" text,\n \"currency\" text,\n \"1_euro\" text,\n \"1_usd\" text,\n \"central_bank\" text\n);\n\nQuestion: What's the value of 1 USD in Paraguay?" }, { "role": "assistant", "content": "SELECT \"1_usd\" FROM \"currency\" WHERE \"country\"='Paraguay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"currency\" (\n \"country\" text,\n \"currency\" text,\n \"1_euro\" text,\n \"1_usd\" text,\n \"central_bank\" text\n);\n\nQuestion: What's the value of 1 Euro in the country where the value of 1 USD is 483.050 of the local currency?" }, { "role": "assistant", "content": "SELECT \"1_euro\" FROM \"currency\" WHERE \"1_usd\"='483.050';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"currency\" (\n \"country\" text,\n \"currency\" text,\n \"1_euro\" text,\n \"1_usd\" text,\n \"central_bank\" text\n);\n\nQuestion: What's the name of the central bank in the country where Colombian Peso (cop) is the local currency?" }, { "role": "assistant", "content": "SELECT \"central_bank\" FROM \"currency\" WHERE \"currency\"='Colombian peso (COP)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"currency\" (\n \"country\" text,\n \"currency\" text,\n \"1_euro\" text,\n \"1_usd\" text,\n \"central_bank\" text\n);\n\nQuestion: What's the name of the country where 1 USD equals 1.71577 of the local currency." }, { "role": "assistant", "content": "SELECT \"country\" FROM \"currency\" WHERE \"1_usd\"='1.71577';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: what's the minimum\u00a0production code\u00a0written by\u00a0jay sommers & dick chevillat and al schwartz" }, { "role": "assistant", "content": "SELECT MIN(\"production_code\") FROM \"table1_12226390_3\" WHERE \"written_by\"='Jay Sommers & Dick Chevillat and Al Schwartz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: what's the total number of\u00a0title\u00a0for production code\u00a039" }, { "role": "assistant", "content": "SELECT COUNT(\"title\") FROM \"table1_12226390_3\" WHERE \"production_code\"=39;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the episode 14 in series?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_12226390_2\" WHERE \"no_in_series\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who directed the episode with production code 28?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_12226390_2\" WHERE \"production_code\"=28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the original air date for the episode \"a pig in a poke\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_12226390_2\" WHERE \"title\"='\\\"A Pig in a Poke\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many episodes were titled \"a pig in a poke\"? " }, { "role": "assistant", "content": "SELECT COUNT(\"written_by\") FROM \"table1_12226390_2\" WHERE \"title\"='\\\"A Pig in a Poke\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the episode titled \"the wedding anniversary\"?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_12226390_2\" WHERE \"title\"='\\\"The Wedding Anniversary\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_6\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What's the title of the episode with a season number 25?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_12226390_6\" WHERE \"no_in_season\"=25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_6\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What's the title of the episode with a production code 136?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_12226390_6\" WHERE \"production_code\"=136;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the original air date for \"Oliver's Jaded Past\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_12226390_4\" WHERE \"title\"='\\\"Oliver''s Jaded Past\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12226390_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What episode was written by Bobby Bell and Bill Lee?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_season\") FROM \"table1_12226390_4\" WHERE \"written_by\"='Bobby Bell and Bill Lee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"season\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: How many women doubles teams competed in the same year as when Jamie van Hooijdonk competed in men singles?" }, { "role": "assistant", "content": "SELECT COUNT(\"womens_doubles\") FROM \"21st_century\" WHERE \"mens_singles\"='Jamie van Hooijdonk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12232526_2\" (\n \"class\" text,\n \"ship_name\" text,\n \"origin\" text,\n \"hull_numbers\" real,\n \"service_years\" text,\n \"previously\" text,\n \"note\" text\n);\n\nQuestion: what is the maximum number of hull numbers?" }, { "role": "assistant", "content": "SELECT MAX(\"hull_numbers\") FROM \"table1_12232526_2\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12232526_2\" (\n \"class\" text,\n \"ship_name\" text,\n \"origin\" text,\n \"hull_numbers\" real,\n \"service_years\" text,\n \"previously\" text,\n \"note\" text\n);\n\nQuestion: who is the class where note is reportedly still active as of 2012?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"table1_12232526_2\" WHERE \"note\"='Reportedly still active as of 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12232526_2\" (\n \"class\" text,\n \"ship_name\" text,\n \"origin\" text,\n \"hull_numbers\" real,\n \"service_years\" text,\n \"previously\" text,\n \"note\" text\n);\n\nQuestion: what is the maximum number of hull nunbers where ship name is kri yos sudarso?" }, { "role": "assistant", "content": "SELECT MAX(\"hull_numbers\") FROM \"table1_12232526_2\" WHERE \"ship_name\"='KRI Yos Sudarso';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_boxing_quintuple_or_five_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"defenses\" real\n);\n\nQuestion: What titles were fought for on 1997-04-12?" }, { "role": "assistant", "content": "SELECT \"titles\" FROM \"list_of_boxing_quintuple_or_five_divisio\" WHERE \"date\"='1997-04-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_boxing_quintuple_or_five_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"defenses\" real\n);\n\nQuestion: What is the date of the match for the lineal super lightweight (140)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"list_of_boxing_quintuple_or_five_divisio\" WHERE \"titles\"='Lineal Super lightweight (140)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_boxing_quintuple_or_five_divisio\" (\n \"number\" real,\n \"name\" text,\n \"titles\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"defenses\" real\n);\n\nQuestion: What is the date of the match for the wbc flyweight (112) title?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"list_of_boxing_quintuple_or_five_divisio\" WHERE \"titles\"='WBC Flyweight (112)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who's the leader in the young rider classification in stage 12?" }, { "role": "assistant", "content": "SELECT \"young_rider_classification\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who's leading in the general classification in stage 1a?" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='1a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: How many leaders are there in the intergiro classification in stage 20?" }, { "role": "assistant", "content": "SELECT COUNT(\"intergiro_classification\") FROM \"classification_leadership_by_stage\" WHERE \"stage\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What's the leader team in the Trofeo Fast Team in stage 20?" }, { "role": "assistant", "content": "SELECT \"trofeo_fast_team\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who's the winner in stage 1a, where the leader in the young rider classification is Francesco Casagrande?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"classification_leadership_by_stage\" WHERE \"young_rider_classification\"='Francesco Casagrande' AND \"stage\"='1a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who's the leader in the general classification in stage 1a?" }, { "role": "assistant", "content": "SELECT \"general_classification\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='1a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Name the general classification of stage 15" }, { "role": "assistant", "content": "SELECT COUNT(\"general_classification\") FROM \"classification_leadership_by_stage\" WHERE \"stage\"='15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Name the trofeo fast team of stage 2" }, { "role": "assistant", "content": "SELECT \"trofeo_fast_team\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Name the young rider classification with laudelino cubino" }, { "role": "assistant", "content": "SELECT \"young_rider_classification\" FROM \"classification_leadership_by_stage\" WHERE \"winner\"='Laudelino Cubino';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Name the total number of trofeo fast team of stage 16" }, { "role": "assistant", "content": "SELECT COUNT(\"trofeo_fast_team\") FROM \"classification_leadership_by_stage\" WHERE \"stage\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: What kind of bleeding does aspirin cause?" }, { "role": "assistant", "content": "SELECT \"bleeding_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"condition\"='Aspirin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: How in prothrombin affected by glanzmann's thrombasthenia." }, { "role": "assistant", "content": "SELECT \"prothrombin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"condition\"='Glanzmann''s thrombasthenia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: How long does thromboplastin last when prothrombin is unaffected?" }, { "role": "assistant", "content": "SELECT \"partial_thromboplastin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"bleeding_time\"='Unaffected' AND \"prothrombin_time\"='Unaffected';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Is uremia affect prothrombin?" }, { "role": "assistant", "content": "SELECT \"prothrombin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"condition\"='Uremia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: Is prothrombin time long when thromboplastin is prolonged?" }, { "role": "assistant", "content": "SELECT \"prothrombin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"bleeding_time\"='Prolonged' AND \"partial_thromboplastin_time\"='Prolonged';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"live_births_2006\" real,\n \"gfr_2006\" text,\n \"tfr_2006\" text,\n \"whites_as_pct_of_pop\" text\n);\n\nQuestion: How many live births were there in 2006 in South Yorkshire (met county)?" }, { "role": "assistant", "content": "SELECT \"live_births_2006\" FROM \"references\" WHERE \"county\"='South Yorkshire (Met County)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"live_births_2006\" real,\n \"gfr_2006\" text,\n \"tfr_2006\" text,\n \"whites_as_pct_of_pop\" text\n);\n\nQuestion: How many TFR were there in 2006 when the GFR was 53.8?" }, { "role": "assistant", "content": "SELECT \"tfr_2006\" FROM \"references\" WHERE \"gfr_2006\"='53.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"live_births_2006\" real,\n \"gfr_2006\" text,\n \"tfr_2006\" text,\n \"whites_as_pct_of_pop\" text\n);\n\nQuestion: How many times was the GFR 2006 equal to 53.2?" }, { "role": "assistant", "content": "SELECT COUNT(\"whites_as_pct_of_pop\") FROM \"references\" WHERE \"gfr_2006\"='53.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12266757_1\" (\n \"season\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: How many mens doubles took place in 1970/1971?" }, { "role": "assistant", "content": "SELECT COUNT(\"mens_doubles\") FROM \"table1_12266757_1\" WHERE \"season\"='1970/1971';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12266757_1\" (\n \"season\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Where were the Womens Doubles in the 1951/1952 season and who won?" }, { "role": "assistant", "content": "SELECT \"womens_doubles\" FROM \"table1_12266757_1\" WHERE \"season\"='1951/1952';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12266757_1\" (\n \"season\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who was the womens singles winnerwhen the mens doubles were stefan karlsson claes nordin , bk aura gbk?" }, { "role": "assistant", "content": "SELECT \"womens_singles\" FROM \"table1_12266757_1\" WHERE \"mens_doubles\"='Stefan Karlsson Claes Nordin , BK Aura GBK';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12266757_1\" (\n \"season\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who were the winners of mens doubles in the 1986/1987 season held?" }, { "role": "assistant", "content": "SELECT \"mens_doubles\" FROM \"table1_12266757_1\" WHERE \"season\"='1986/1987';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12266757_1\" (\n \"season\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the Mens Singles when the Mixed doubles went to Stellan Mohlin Kerstin St\u00e5hl , Aik?" }, { "role": "assistant", "content": "SELECT \"mens_singles\" FROM \"table1_12266757_1\" WHERE \"mixed_doubles\"='Stellan Mohlin Kerstin St\u00e5hl , AIK';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12266757_1\" (\n \"season\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the womens singles in the 1958/1959 season?" }, { "role": "assistant", "content": "SELECT \"womens_singles\" FROM \"table1_12266757_1\" WHERE \"season\"='1958/1959';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"peak\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"isolation_km\" real,\n \"municipality\" text,\n \"county\" text\n);\n\nQuestion: What county is in isolation of 29?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"see_also\" WHERE \"isolation_km\"=29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"peak\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"isolation_km\" real,\n \"municipality\" text,\n \"county\" text\n);\n\nQuestion: What is the county with an elevation of 1262?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"see_also\" WHERE \"elevation_m\"=1262;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"peak\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"isolation_km\" real,\n \"municipality\" text,\n \"county\" text\n);\n\nQuestion: Name the rank where the municipality is sunndal?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"see_also\" WHERE \"municipality\"='Sunndal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"peak\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"isolation_km\" real,\n \"municipality\" text,\n \"county\" text\n);\n\nQuestion: Name the county with the peak being indre russetind?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"see_also\" WHERE \"peak\"='Indre Russetind';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" real,\n \"peak\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"isolation_km\" real,\n \"municipality\" text,\n \"county\" text\n);\n\nQuestion: What is the number of rank of peak fresvikbreen?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"see_also\" WHERE \"peak\"='Fresvikbreen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the mens singles when sayaka sato won the womens singles?" }, { "role": "assistant", "content": "SELECT \"mens_singles\" FROM \"previous_winners\" WHERE \"womens_singles\"='Sayaka Sato';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: When did Chetan Anand win his first men's single?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"previous_winners\" WHERE \"mens_singles\"='Chetan Anand';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: How many times did Niels Christian Kaldau win the men's single and Pi Hongyan win the women's single in the same year?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"previous_winners\" WHERE \"mens_singles\"='Niels Christian Kaldau' AND \"womens_singles\"='Pi Hongyan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the men's double when Chou Tien-Chen won the men's single?" }, { "role": "assistant", "content": "SELECT \"mens_doubles\" FROM \"previous_winners\" WHERE \"mens_singles\"='Chou Tien-chen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_12283621_6\" (\n \"season\" text,\n \"serbian_league_belgrade\" text,\n \"serbian_league_east\" text,\n \"serbian_league_vojvodina\" text,\n \"serbian_league_west\" text\n);\n\nQuestion: What team was promoted in the Serbian League East in the same season when Kolubara was promoted in the Serbian League Belgrade?" }, { "role": "assistant", "content": "SELECT \"serbian_league_east\" FROM \"table1_12283621_6\" WHERE \"serbian_league_belgrade\"='Kolubara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_yuan\" (\n \"year\" real,\n \"denomination\" text,\n \"alloy\" text,\n \"reverse\" text,\n \"diameter\" text,\n \"weight\" text,\n \"obverse\" text,\n \"mintage\" real,\n \"series\" text\n);\n\nQuestion: what's the\u00a0series\u00a0with\u00a0reverse\u00a0being swimming" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1_yuan\" WHERE \"reverse\"='Swimming';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_yuan\" (\n \"year\" real,\n \"denomination\" text,\n \"alloy\" text,\n \"reverse\" text,\n \"diameter\" text,\n \"weight\" text,\n \"obverse\" text,\n \"mintage\" real,\n \"series\" text\n);\n\nQuestion: what's the\u00a0alloy\u00a0with\u00a0series\u00a0being ii series" }, { "role": "assistant", "content": "SELECT \"alloy\" FROM \"1_yuan\" WHERE \"series\"='II series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_yuan\" (\n \"year\" real,\n \"denomination\" text,\n \"alloy\" text,\n \"reverse\" text,\n \"diameter\" text,\n \"weight\" text,\n \"obverse\" text,\n \"mintage\" real,\n \"series\" text\n);\n\nQuestion: what's the\u00a0denomination\u00a0with\u00a0year\u00a0being 2008 and\u00a0reverse\u00a0being football" }, { "role": "assistant", "content": "SELECT \"denomination\" FROM \"1_yuan\" WHERE \"year\"=2008 AND \"reverse\"='Football';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_yuan\" (\n \"year\" real,\n \"denomination\" text,\n \"alloy\" text,\n \"reverse\" text,\n \"diameter\" text,\n \"weight\" text,\n \"obverse\" text,\n \"mintage\" real,\n \"series\" text\n);\n\nQuestion: how many\u00a0reverse\u00a0with\u00a0series\u00a0being iii series" }, { "role": "assistant", "content": "SELECT COUNT(\"reverse\") FROM \"1_yuan\" WHERE \"series\"='III series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_clubs\" (\n \"num\" real,\n \"nation\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: How many times did kingfisher east bengal fc win?" }, { "role": "assistant", "content": "SELECT MIN(\"winners\") FROM \"performances_by_clubs\" WHERE \"nation\"='Kingfisher East Bengal FC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_clubs\" (\n \"num\" real,\n \"nation\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: How many times did bec tero sasana win?" }, { "role": "assistant", "content": "SELECT MAX(\"winners\") FROM \"performances_by_clubs\" WHERE \"nation\"='BEC Tero Sasana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_under_20_women\" (\n \"rank\" real,\n \"fastest_time_s\" text,\n \"wind_m_s\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: Nigeria competed on July2, 1999." }, { "role": "assistant", "content": "SELECT \"date\" FROM \"junior_under_20_women\" WHERE \"nation\"='Nigeria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"junior_under_20_women\" (\n \"rank\" real,\n \"fastest_time_s\" text,\n \"wind_m_s\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: Nigeria had the fastest time once." }, { "role": "assistant", "content": "SELECT COUNT(\"fastest_time_s\") FROM \"junior_under_20_women\" WHERE \"nation\"='Nigeria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nations\" (\n \"num\" real,\n \"nation\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: how many\u00a0runners-up\u00a0with\u00a0nation\u00a0being india" }, { "role": "assistant", "content": "SELECT COUNT(\"runners_up\") FROM \"performances_by_nations\" WHERE \"nation\"='India';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nations\" (\n \"num\" real,\n \"nation\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: what's the\u00a0runners-up\u00a0with\u00a0nation\u00a0being malaysia" }, { "role": "assistant", "content": "SELECT \"runners_up\" FROM \"performances_by_nations\" WHERE \"nation\"='Malaysia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nations\" (\n \"num\" real,\n \"nation\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: how many\u00a0winners\u00a0with\u00a0#\u00a0being 4" }, { "role": "assistant", "content": "SELECT COUNT(\"winners\") FROM \"performances_by_nations\" WHERE \"num\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nations\" (\n \"num\" real,\n \"nation\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: how many maximum winners" }, { "role": "assistant", "content": "SELECT MAX(\"winners\") FROM \"performances_by_nations\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nations\" (\n \"num\" real,\n \"nation\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"3rd_place\" real,\n \"4th_place\" real\n);\n\nQuestion: how many winners from vietnam" }, { "role": "assistant", "content": "SELECT \"winners\" FROM \"performances_by_nations\" WHERE \"nation\"='Vietnam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dance_offs\" (\n \"week\" real,\n \"craigs_vote\" text,\n \"arlenes_vote\" text,\n \"brunos_vote\" text,\n \"lens_vote\" text,\n \"safe\" text,\n \"eliminated\" text\n);\n\nQuestion: What was the total of arlenes vote when craig voted for brian and karen?" }, { "role": "assistant", "content": "SELECT COUNT(\"arlenes_vote\") FROM \"dance_offs\" WHERE \"craigs_vote\"='Brian and Karen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dance_offs\" (\n \"week\" real,\n \"craigs_vote\" text,\n \"arlenes_vote\" text,\n \"brunos_vote\" text,\n \"lens_vote\" text,\n \"safe\" text,\n \"eliminated\" text\n);\n\nQuestion: What is the max week where kate and anton are eliminated?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"dance_offs\" WHERE \"eliminated\"='Kate and Anton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dance_offs\" (\n \"week\" real,\n \"craigs_vote\" text,\n \"arlenes_vote\" text,\n \"brunos_vote\" text,\n \"lens_vote\" text,\n \"safe\" text,\n \"eliminated\" text\n);\n\nQuestion: What is the number eliminated when kelly and brendan are safe?" }, { "role": "assistant", "content": "SELECT COUNT(\"eliminated\") FROM \"dance_offs\" WHERE \"safe\"='Kelly and Brendan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dance_offs\" (\n \"week\" real,\n \"craigs_vote\" text,\n \"arlenes_vote\" text,\n \"brunos_vote\" text,\n \"lens_vote\" text,\n \"safe\" text,\n \"eliminated\" text\n);\n\nQuestion: Who is safe if John and Nicole are eliminated?" }, { "role": "assistant", "content": "SELECT \"safe\" FROM \"dance_offs\" WHERE \"eliminated\"='John and Nicole';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"dance_offs\" (\n \"week\" real,\n \"craigs_vote\" text,\n \"arlenes_vote\" text,\n \"brunos_vote\" text,\n \"lens_vote\" text,\n \"safe\" text,\n \"eliminated\" text\n);\n\nQuestion: What is the total number of brunos vote when willie and erin are eliminated?" }, { "role": "assistant", "content": "SELECT COUNT(\"brunos_vote\") FROM \"dance_offs\" WHERE \"eliminated\"='Willie and Erin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foreign_players\" (\n \"country\" text,\n \"player_name\" text,\n \"period\" text,\n \"position\" text,\n \"matches\" text,\n \"goals\" text\n);\n\nQuestion: How many goals were scored by the player who played 17 matches?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"foreign_players\" WHERE \"matches\"='17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foreign_players\" (\n \"country\" text,\n \"player_name\" text,\n \"period\" text,\n \"position\" text,\n \"matches\" text,\n \"goals\" text\n);\n\nQuestion: What is the name of the player who played in 2009 only?" }, { "role": "assistant", "content": "SELECT \"player_name\" FROM \"foreign_players\" WHERE \"period\"='2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foreign_players\" (\n \"country\" text,\n \"player_name\" text,\n \"period\" text,\n \"position\" text,\n \"matches\" text,\n \"goals\" text\n);\n\nQuestion: How many goals have been scored by Tiago Gomes?" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"foreign_players\" WHERE \"player_name\"='Tiago Gomes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youth_under_18_girls\" (\n \"rank\" real,\n \"fastest_time_s\" text,\n \"wind_m_s\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: Which athlete is from Mexico City?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"youth_under_18_girls\" WHERE \"location\"='Mexico City';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youth_under_18_girls\" (\n \"rank\" real,\n \"fastest_time_s\" text,\n \"wind_m_s\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What is the athlete from Edwardsville?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"youth_under_18_girls\" WHERE \"location\"='Edwardsville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youth_under_18_girls\" (\n \"rank\" real,\n \"fastest_time_s\" text,\n \"wind_m_s\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What was the wind on 21 june 1976?" }, { "role": "assistant", "content": "SELECT \"wind_m_s\" FROM \"youth_under_18_girls\" WHERE \"date\"='21 June 1976';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youth_under_18_girls\" (\n \"rank\" real,\n \"fastest_time_s\" text,\n \"wind_m_s\" text,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What is the number of locations with the fastest times of 11.13?" }, { "role": "assistant", "content": "SELECT COUNT(\"location\") FROM \"youth_under_18_girls\" WHERE \"fastest_time_s\"='11.13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1231892_4\" (\n \"number_in_series\" real,\n \"broadcast_order\" text,\n \"title\" text,\n \"villain_s\" text,\n \"u_s_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the title of the episode with a broadcast order s04 e01?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_1231892_4\" WHERE \"broadcast_order\"='S04 E01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1231892_4\" (\n \"number_in_series\" real,\n \"broadcast_order\" text,\n \"title\" text,\n \"villain_s\" text,\n \"u_s_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the number of episodes with a broadcast order s04 e07?" }, { "role": "assistant", "content": "SELECT COUNT(\"number_in_series\") FROM \"table1_1231892_4\" WHERE \"broadcast_order\"='S04 E07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1231892_4\" (\n \"number_in_series\" real,\n \"broadcast_order\" text,\n \"title\" text,\n \"villain_s\" text,\n \"u_s_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: what's the total number of episodes with a US air date of january 15, 2005?" }, { "role": "assistant", "content": "SELECT COUNT(\"production_code\") FROM \"table1_1231892_4\" WHERE \"u_s_air_date\"='January 15, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1231892_4\" (\n \"number_in_series\" real,\n \"broadcast_order\" text,\n \"title\" text,\n \"villain_s\" text,\n \"u_s_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the series number of the episode titled \"The Quest\"?" }, { "role": "assistant", "content": "SELECT MAX(\"number_in_series\") FROM \"table1_1231892_4\" WHERE \"title\"='\\\"The Quest\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1231892_4\" (\n \"number_in_series\" real,\n \"broadcast_order\" text,\n \"title\" text,\n \"villain_s\" text,\n \"u_s_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the original air date of the episode with a broadcast order s04 e01?" }, { "role": "assistant", "content": "SELECT \"u_s_air_date\" FROM \"table1_1231892_4\" WHERE \"broadcast_order\"='S04 E01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1231892_4\" (\n \"number_in_series\" real,\n \"broadcast_order\" text,\n \"title\" text,\n \"villain_s\" text,\n \"u_s_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the series number of the episode with a broadcast order s04 e07?" }, { "role": "assistant", "content": "SELECT MAX(\"number_in_series\") FROM \"table1_1231892_4\" WHERE \"broadcast_order\"='S04 E07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipal_detachments\" (\n \"municipality\" text,\n \"population\" real,\n \"police_officers\" real,\n \"residents_per_officer\" real,\n \"total_costs_2005\" text,\n \"cost_per_capita\" text,\n \"case_burden\" real,\n \"crime_rate_per_1_000_people\" real,\n \"police_force\" text\n);\n\nQuestion: Which police force serves a population of 17000?" }, { "role": "assistant", "content": "SELECT \"police_force\" FROM \"municipal_detachments\" WHERE \"population\"=17000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipal_detachments\" (\n \"municipality\" text,\n \"population\" real,\n \"police_officers\" real,\n \"residents_per_officer\" real,\n \"total_costs_2005\" text,\n \"cost_per_capita\" text,\n \"case_burden\" real,\n \"crime_rate_per_1_000_people\" real,\n \"police_force\" text\n);\n\nQuestion: When total costs (2005) are $700,116, what is the cost per capita?" }, { "role": "assistant", "content": "SELECT \"cost_per_capita\" FROM \"municipal_detachments\" WHERE \"total_costs_2005\"='$700,116';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipal_detachments\" (\n \"municipality\" text,\n \"population\" real,\n \"police_officers\" real,\n \"residents_per_officer\" real,\n \"total_costs_2005\" text,\n \"cost_per_capita\" text,\n \"case_burden\" real,\n \"crime_rate_per_1_000_people\" real,\n \"police_force\" text\n);\n\nQuestion: What is the cost per capita in the Courtenay municipality?" }, { "role": "assistant", "content": "SELECT \"cost_per_capita\" FROM \"municipal_detachments\" WHERE \"municipality\"='Courtenay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipal_detachments\" (\n \"municipality\" text,\n \"population\" real,\n \"police_officers\" real,\n \"residents_per_officer\" real,\n \"total_costs_2005\" text,\n \"cost_per_capita\" text,\n \"case_burden\" real,\n \"crime_rate_per_1_000_people\" real,\n \"police_force\" text\n);\n\nQuestion: Which crime rate per 1,000 people is associated with a cost per capita of $152?" }, { "role": "assistant", "content": "SELECT MAX(\"crime_rate_per_1_000_people\") FROM \"municipal_detachments\" WHERE \"cost_per_capita\"='$152';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipal_detachments\" (\n \"municipality\" text,\n \"population\" real,\n \"police_officers\" real,\n \"residents_per_officer\" real,\n \"total_costs_2005\" text,\n \"cost_per_capita\" text,\n \"case_burden\" real,\n \"crime_rate_per_1_000_people\" real,\n \"police_force\" text\n);\n\nQuestion: If the number of police officers is 94, what is the lowest population number?" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"municipal_detachments\" WHERE \"police_officers\"=94;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipal_detachments\" (\n \"municipality\" text,\n \"population\" real,\n \"police_officers\" real,\n \"residents_per_officer\" real,\n \"total_costs_2005\" text,\n \"cost_per_capita\" text,\n \"case_burden\" real,\n \"crime_rate_per_1_000_people\" real,\n \"police_force\" text\n);\n\nQuestion: What is the value of total costs (2005) in the Coldstream municipality?" }, { "role": "assistant", "content": "SELECT \"total_costs_2005\" FROM \"municipal_detachments\" WHERE \"municipality\"='Coldstream';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: What is the interview score for the state of Virginia?" }, { "role": "assistant", "content": "SELECT \"interview\" FROM \"final_competition_scores\" WHERE \"state\"='Virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: How much is the average score for New York state?" }, { "role": "assistant", "content": "SELECT \"average\" FROM \"final_competition_scores\" WHERE \"state\"='New York';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: Which interview score corresponds with the evening gown score of 8.977?" }, { "role": "assistant", "content": "SELECT \"interview\" FROM \"final_competition_scores\" WHERE \"evening_gown\"='8.977';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: What is the preliminary score associated with the interview score of 8.488?" }, { "role": "assistant", "content": "SELECT COUNT(\"preliminaries\") FROM \"final_competition_scores\" WHERE \"interview\"='8.488';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: What swimsuit score did the state of Virginia contestant achieve?" }, { "role": "assistant", "content": "SELECT COUNT(\"swimsuit\") FROM \"final_competition_scores\" WHERE \"state\"='Virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_scores\" (\n \"state\" text,\n \"preliminaries\" text,\n \"interview\" text,\n \"swimsuit\" text,\n \"evening_gown\" text,\n \"average\" text\n);\n\nQuestion: Which interview score belongs to the state of Nevada contestant?" }, { "role": "assistant", "content": "SELECT \"interview\" FROM \"final_competition_scores\" WHERE \"state\"='Nevada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"record\" text,\n \"date_and_time\" text,\n \"competition\" text,\n \"home_or_away\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: For the competition Mithras Cup 2nd Rd (2nd Leg), what is the date and time?" }, { "role": "assistant", "content": "SELECT \"date_and_time\" FROM \"scores\" WHERE \"competition\"='Mithras Cup 2nd Rd (2nd Leg)';" } ]