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 \"table1_14098_1\" (\n \"country_or_territory_with_flag\" text,\n \"area_km_per_sqmi\" text,\n \"population_july_2009_est\" real,\n \"population_density_per_km\" text,\n \"capital\" text\n);\n\nQuestion: What country'c capital is santiago?" }, { "role": "assistant", "content": "SELECT \"country_or_territory_with_flag\" FROM \"table1_14098_1\" WHERE \"capital\"='Santiago';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: who is the the\u00a0voice actor (englbeingh 1998 / pioneer)\u00a0with\u00a0voice actor (englbeingh 1997 / saban)\u00a0being alec willows and\u00a0voice actor (englbeingh 2006 / funimation)\u00a0being andy mcavin" }, { "role": "assistant", "content": "SELECT \"voice_actor_english_1998_pioneer\" FROM \"cast\" WHERE \"voice_actor_english_1997_saban\"='Alec Willows' AND \"voice_actor_english_2006_fu_nimation\"='Andy McAvin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: what's the\u00a0character name\u00a0with\u00a0voice actor (englbeingh 1997 / saban)\u00a0being ian james corlett" }, { "role": "assistant", "content": "SELECT \"character_name\" FROM \"cast\" WHERE \"voice_actor_english_1997_saban\"='Ian James Corlett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: what's the\u00a0character name\u00a0with\u00a0voice actor (englbeingh 1998 / pioneer)\u00a0being paul dobson" }, { "role": "assistant", "content": "SELECT \"character_name\" FROM \"cast\" WHERE \"voice_actor_english_1998_pioneer\"='Paul Dobson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: how many\u00a0voice actor (englbeingh 1998 / pioneer)\u00a0with\u00a0voice actor (japanese)\u00a0being shinobu satouchi" }, { "role": "assistant", "content": "SELECT COUNT(\"voice_actor_english_1998_pioneer\") FROM \"cast\" WHERE \"voice_actor_japanese\"='Shinobu Satouchi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: who is the the\u00a0voice actor (japanese)\u00a0with\u00a0character name\u00a0being goku" }, { "role": "assistant", "content": "SELECT \"voice_actor_japanese\" FROM \"cast\" WHERE \"character_name\"='Goku';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"college_sports\" (\n \"school\" text,\n \"mascot\" text,\n \"conference\" text,\n \"national_titles\" real,\n \"founded\" real\n);\n\nQuestion: how many big wins does peru state college have" }, { "role": "assistant", "content": "SELECT COUNT(\"national_titles\") FROM \"college_sports\" WHERE \"school\"='Peru State College';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"college_sports\" (\n \"school\" text,\n \"mascot\" text,\n \"conference\" text,\n \"national_titles\" real,\n \"founded\" real\n);\n\nQuestion: which school has 14 large championships" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"college_sports\" WHERE \"national_titles\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"college_sports\" (\n \"school\" text,\n \"mascot\" text,\n \"conference\" text,\n \"national_titles\" real,\n \"founded\" real\n);\n\nQuestion: how many overall championships does concordia university have" }, { "role": "assistant", "content": "SELECT MIN(\"national_titles\") FROM \"college_sports\" WHERE \"school\"='Concordia University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"use\" (\n \"edo_flight\" real,\n \"shuttle\" text,\n \"mission\" text,\n \"launch_date\" text,\n \"duration\" text,\n \"primary_payload_s\" text\n);\n\nQuestion: what's the\u00a0duration\u00a0with\u00a0mission being sts-87" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"use\" WHERE \"mission\"='STS-87';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"use\" (\n \"edo_flight\" real,\n \"shuttle\" text,\n \"mission\" text,\n \"launch_date\" text,\n \"duration\" text,\n \"primary_payload_s\" text\n);\n\nQuestion: what's the\u00a0edo flight\u00a0with\u00a0duration\u00a0being 17 days, 15 hours, 53 minutes, 18 seconds" }, { "role": "assistant", "content": "SELECT \"edo_flight\" FROM \"use\" WHERE \"duration\"='17 days, 15 hours, 53 minutes, 18 seconds';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"use\" (\n \"edo_flight\" real,\n \"shuttle\" text,\n \"mission\" text,\n \"launch_date\" text,\n \"duration\" text,\n \"primary_payload_s\" text\n);\n\nQuestion: what's the\u00a0primary payload(s)\u00a0with\u00a0launch date\u00a0being july 8, 1994" }, { "role": "assistant", "content": "SELECT \"primary_payload_s\" FROM \"use\" WHERE \"launch_date\"='July 8, 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"use\" (\n \"edo_flight\" real,\n \"shuttle\" text,\n \"mission\" text,\n \"launch_date\" text,\n \"duration\" text,\n \"primary_payload_s\" text\n);\n\nQuestion: what's the\u00a0mission with\u00a0primary payload(s)\u00a0being spacelab life sciences-2" }, { "role": "assistant", "content": "SELECT \"mission\" FROM \"use\" WHERE \"primary_payload_s\"='Spacelab Life Sciences-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"use\" (\n \"edo_flight\" real,\n \"shuttle\" text,\n \"mission\" text,\n \"launch_date\" text,\n \"duration\" text,\n \"primary_payload_s\" text\n);\n\nQuestion: what's the\u00a0shuttle\u00a0with\u00a0primary payload(s)\u00a0being united states microgravity laboratory-1" }, { "role": "assistant", "content": "SELECT \"shuttle\" FROM \"use\" WHERE \"primary_payload_s\"='United States Microgravity Laboratory-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"use\" (\n \"edo_flight\" real,\n \"shuttle\" text,\n \"mission\" text,\n \"launch_date\" text,\n \"duration\" text,\n \"primary_payload_s\" text\n);\n\nQuestion: how many\u00a0primary payload(s)\u00a0with\u00a0shuttle\u00a0being columbia and\u00a0duration\u00a0being 13 days, 19 hours, 30 minutes, 4 seconds" }, { "role": "assistant", "content": "SELECT COUNT(\"primary_payload_s\") FROM \"use\" WHERE \"shuttle\"='Columbia' AND \"duration\"='13 days, 19 hours, 30 minutes, 4 seconds';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" real,\n \"class\" text,\n \"team\" text,\n \"motorcycle\" text,\n \"type\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"fastest_laps\" real,\n \"pts\" text,\n \"position\" text\n);\n\nQuestion: what's the\u00a0pts\u00a0with\u00a0team\u00a0being kopron team scot" }, { "role": "assistant", "content": "SELECT \"pts\" FROM \"by_seasons_and_teams\" WHERE \"team\"='Kopron Team Scot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" real,\n \"class\" text,\n \"team\" text,\n \"motorcycle\" text,\n \"type\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"fastest_laps\" real,\n \"pts\" text,\n \"position\" text\n);\n\nQuestion: what's the\u00a0pts\u00a0with\u00a0position\u00a0being nc" }, { "role": "assistant", "content": "SELECT \"pts\" FROM \"by_seasons_and_teams\" WHERE \"position\"='NC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" real,\n \"class\" text,\n \"team\" text,\n \"motorcycle\" text,\n \"type\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"fastest_laps\" real,\n \"pts\" text,\n \"position\" text\n);\n\nQuestion: what's the\u00a0pts\u00a0with\u00a0poles\u00a0being smaller than 1.0 and\u00a0motorcycle\u00a0being aprilia and\u00a0class\u00a0being 250cc" }, { "role": "assistant", "content": "SELECT \"pts\" FROM \"by_seasons_and_teams\" WHERE \"poles\"<1.0 AND \"motorcycle\"='Aprilia' AND \"class\"='250cc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" real,\n \"class\" text,\n \"team\" text,\n \"motorcycle\" text,\n \"type\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"fastest_laps\" real,\n \"pts\" text,\n \"position\" text\n);\n\nQuestion: what's the\u00a0poles\u00a0with\u00a0pts\u00a0being 81" }, { "role": "assistant", "content": "SELECT \"poles\" FROM \"by_seasons_and_teams\" WHERE \"pts\"='81';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" real,\n \"class\" text,\n \"team\" text,\n \"motorcycle\" text,\n \"type\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"fastest_laps\" real,\n \"pts\" text,\n \"position\" text\n);\n\nQuestion: how many\u00a0class\u00a0with\u00a0poles\u00a0being bigger than 1.0" }, { "role": "assistant", "content": "SELECT COUNT(\"class\") FROM \"by_seasons_and_teams\" WHERE \"poles\">1.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" real,\n \"class\" text,\n \"team\" text,\n \"motorcycle\" text,\n \"type\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"fastest_laps\" real,\n \"pts\" text,\n \"position\" text\n);\n\nQuestion: what's the\u00a0position\u00a0with\u00a0team\u00a0being skilled racing team" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"by_seasons_and_teams\" WHERE \"team\"='Skilled Racing Team';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: Who was the defensive award winner in February when the rookie award was given to Rhys Duch?" }, { "role": "assistant", "content": "SELECT \"defensive\" FROM \"weekly_awards\" WHERE \"month\"='February' AND \"rookie\"='Rhys Duch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: Who was the offensive award winner the week when Bob Watson was given the overall award?" }, { "role": "assistant", "content": "SELECT \"offensive\" FROM \"weekly_awards\" WHERE \"overall\"='Bob Watson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: Who was the defensive award winner when the rookie award was given to Daryl Veltman and the offensive award was given to Mark Steenhuis?" }, { "role": "assistant", "content": "SELECT \"defensive\" FROM \"weekly_awards\" WHERE \"rookie\"='Daryl Veltman' AND \"offensive\"='Mark Steenhuis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_awards\" (\n \"month\" text,\n \"week\" real,\n \"overall\" text,\n \"offensive\" text,\n \"defensive\" text,\n \"transition\" text,\n \"rookie\" text\n);\n\nQuestion: Who won the rookie award the week the transition award was given to Brodie Merrill and the offensive award was given to Pat Maddalena?" }, { "role": "assistant", "content": "SELECT \"rookie\" FROM \"weekly_awards\" WHERE \"transition\"='Brodie Merrill' AND \"offensive\"='Pat Maddalena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_schools_grades_9_12\" (\n \"high_school\" text,\n \"type\" text,\n \"established\" real,\n \"enrollment\" real,\n \"mascot\" text,\n \"wiaa_classification\" text,\n \"notes\" text\n);\n\nQuestion: What is the lowest enrollment value out of the enrollment values I'd the schools with a 3A WIAA clarification? " }, { "role": "assistant", "content": "SELECT MIN(\"enrollment\") FROM \"high_schools_grades_9_12\" WHERE \"wiaa_classification\"='3A';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_schools_grades_9_12\" (\n \"high_school\" text,\n \"type\" text,\n \"established\" real,\n \"enrollment\" real,\n \"mascot\" text,\n \"wiaa_classification\" text,\n \"notes\" text\n);\n\nQuestion: What is the WIAA classification of Oakland Alternative High School? " }, { "role": "assistant", "content": "SELECT \"wiaa_classification\" FROM \"high_schools_grades_9_12\" WHERE \"high_school\"='Oakland Alternative';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_schools_grades_9_12\" (\n \"high_school\" text,\n \"type\" text,\n \"established\" real,\n \"enrollment\" real,\n \"mascot\" text,\n \"wiaa_classification\" text,\n \"notes\" text\n);\n\nQuestion: When was Mount Tahoma established? " }, { "role": "assistant", "content": "SELECT MAX(\"established\") FROM \"high_schools_grades_9_12\" WHERE \"high_school\"='Mount Tahoma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_schools_grades_9_12\" (\n \"high_school\" text,\n \"type\" text,\n \"established\" real,\n \"enrollment\" real,\n \"mascot\" text,\n \"wiaa_classification\" text,\n \"notes\" text\n);\n\nQuestion: What's the note about the school established in the year of 1973?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"high_schools_grades_9_12\" WHERE \"established\"=1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supervisors\" (\n \"year\" real,\n \"1st_district\" text,\n \"2nd_district\" text,\n \"3rd_district\" text,\n \"4th_district\" text,\n \"5th_district\" text\n);\n\nQuestion: Who was in the 4th district in 1924?" }, { "role": "assistant", "content": "SELECT \"4th_district\" FROM \"supervisors\" WHERE \"year\"=1924;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supervisors\" (\n \"year\" real,\n \"1st_district\" text,\n \"2nd_district\" text,\n \"3rd_district\" text,\n \"4th_district\" text,\n \"5th_district\" text\n);\n\nQuestion: List all the years with Cecil M. Featherly in the 1st district and David L. Baker in the 2nd district?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"supervisors\" WHERE \"2nd_district\"='David L. Baker' AND \"1st_district\"='Cecil M. Featherly';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supervisors\" (\n \"year\" real,\n \"1st_district\" text,\n \"2nd_district\" text,\n \"3rd_district\" text,\n \"4th_district\" text,\n \"5th_district\" text\n);\n\nQuestion: What is the last year that Howard A. Wassum was in the 5th district?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"supervisors\" WHERE \"5th_district\"='Howard A. Wassum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school_name\" text,\n \"city\" text,\n \"students\" real,\n \"fte_teachers\" text,\n \"pupil_teacher_ratio\" text,\n \"school_level\" text,\n \"low_grade\" text,\n \"high_grade\" text\n);\n\nQuestion: List all FTE middle school teachers in Sunnyvale." }, { "role": "assistant", "content": "SELECT \"fte_teachers\" FROM \"schools\" WHERE \"school_level\"='Middle' AND \"city\"='Sunnyvale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school_name\" text,\n \"city\" text,\n \"students\" real,\n \"fte_teachers\" text,\n \"pupil_teacher_ratio\" text,\n \"school_level\" text,\n \"low_grade\" text,\n \"high_grade\" text\n);\n\nQuestion: What is the highest number of students with a teacher:student ratio of 20.8?" }, { "role": "assistant", "content": "SELECT MAX(\"students\") FROM \"schools\" WHERE \"pupil_teacher_ratio\"='20.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school_name\" text,\n \"city\" text,\n \"students\" real,\n \"fte_teachers\" text,\n \"pupil_teacher_ratio\" text,\n \"school_level\" text,\n \"low_grade\" text,\n \"high_grade\" text\n);\n\nQuestion: How many FTE teachers are there when the student:teacher ration is 19?" }, { "role": "assistant", "content": "SELECT \"fte_teachers\" FROM \"schools\" WHERE \"pupil_teacher_ratio\"='19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14158567_1\" (\n \"member_elect\" text,\n \"party\" text,\n \"district\" text,\n \"election_date\" text,\n \"congress\" text,\n \"reason_for_non_seating\" text\n);\n\nQuestion: What edition of congress for member-elect richard p. giles?" }, { "role": "assistant", "content": "SELECT \"congress\" FROM \"table1_14158567_1\" WHERE \"member_elect\"='Richard P. Giles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1416612_1\" (\n \"state\" text,\n \"highest_point\" text,\n \"highest_elevation\" text,\n \"lowest_point\" text,\n \"lowest_elevation\" text,\n \"mean_elevation\" text\n);\n\nQuestion: how many\u00a0mean elevation\u00a0with\u00a0lowest point\u00a0being gulf of mexico and\u00a0state\u00a0being texas" }, { "role": "assistant", "content": "SELECT COUNT(\"mean_elevation\") FROM \"table1_1416612_1\" WHERE \"lowest_point\"='Gulf of Mexico' AND \"state\"='Texas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1416612_1\" (\n \"state\" text,\n \"highest_point\" text,\n \"highest_elevation\" text,\n \"lowest_point\" text,\n \"lowest_elevation\" text,\n \"mean_elevation\" text\n);\n\nQuestion: what's the\u00a0highest point\u00a0with\u00a0lowest point\u00a0being belle fourche river at south dakota border" }, { "role": "assistant", "content": "SELECT \"highest_point\" FROM \"table1_1416612_1\" WHERE \"lowest_point\"='Belle Fourche River at South Dakota border';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1416612_1\" (\n \"state\" text,\n \"highest_point\" text,\n \"highest_elevation\" text,\n \"lowest_point\" text,\n \"lowest_elevation\" text,\n \"mean_elevation\" text\n);\n\nQuestion: what's the\u00a0lowest elevation\u00a0with\u00a0highest point\u00a0being charles mound" }, { "role": "assistant", "content": "SELECT \"lowest_elevation\" FROM \"table1_1416612_1\" WHERE \"highest_point\"='Charles Mound';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1416612_1\" (\n \"state\" text,\n \"highest_point\" text,\n \"highest_elevation\" text,\n \"lowest_point\" text,\n \"lowest_elevation\" text,\n \"mean_elevation\" text\n);\n\nQuestion: what's the\u00a0lowest point\u00a0with\u00a0highest point\u00a0being mount greylock" }, { "role": "assistant", "content": "SELECT \"lowest_point\" FROM \"table1_1416612_1\" WHERE \"highest_point\"='Mount Greylock';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1416612_1\" (\n \"state\" text,\n \"highest_point\" text,\n \"highest_elevation\" text,\n \"lowest_point\" text,\n \"lowest_elevation\" text,\n \"mean_elevation\" text\n);\n\nQuestion: what's the\u00a0state\u00a0with\u00a0highest point\u00a0being mount katahdin" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"table1_1416612_1\" WHERE \"highest_point\"='Mount Katahdin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_version\" (\n \"song_title\" text,\n \"artist\" text,\n \"language\" text,\n \"decade\" text,\n \"genre\" text,\n \"exportable\" text,\n \"family_friendly\" text\n);\n\nQuestion: What language for the glam genre?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"european_version\" WHERE \"genre\"='Glam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_version\" (\n \"song_title\" text,\n \"artist\" text,\n \"language\" text,\n \"decade\" text,\n \"genre\" text,\n \"exportable\" text,\n \"family_friendly\" text\n);\n\nQuestion: What game allow the 1980s to be exportable?" }, { "role": "assistant", "content": "SELECT \"exportable\" FROM \"european_version\" WHERE \"decade\"='1980s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_version\" (\n \"song_title\" text,\n \"artist\" text,\n \"language\" text,\n \"decade\" text,\n \"genre\" text,\n \"exportable\" text,\n \"family_friendly\" text\n);\n\nQuestion: How many family friendly games are in the 1990s?" }, { "role": "assistant", "content": "SELECT COUNT(\"family_friendly\") FROM \"european_version\" WHERE \"decade\"='1990s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: When 0-1 is the aggregate what are the home (1st leg)?" }, { "role": "assistant", "content": "SELECT \"home_1st_leg\" FROM \"losers_knockout\" WHERE \"aggregate\"='0-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: When 2-0 is the 1st leg what are the home (2nd leg)?" }, { "role": "assistant", "content": "SELECT \"home_2nd_leg\" FROM \"losers_knockout\" WHERE \"1st_leg\"='2-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: When belgrano is the home (1st leg) what is the home (2nd leg)?" }, { "role": "assistant", "content": "SELECT \"home_2nd_leg\" FROM \"losers_knockout\" WHERE \"home_1st_leg\"='Belgrano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: When platense is the home (2nd leg) what is the 2nd leg?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"losers_knockout\" WHERE \"home_2nd_leg\"='Platense';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: When altos hornos zapla is the home (1st leg) what is overall amount of 1st leg?" }, { "role": "assistant", "content": "SELECT COUNT(\"1st_leg\") FROM \"losers_knockout\" WHERE \"home_1st_leg\"='Altos Hornos Zapla';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: When temperley is the home (2nd leg) what is the home (1st leg)?" }, { "role": "assistant", "content": "SELECT \"home_1st_leg\" FROM \"losers_knockout\" WHERE \"home_2nd_leg\"='Temperley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: How many 2nd legs had an aggregate of 2-4?" }, { "role": "assistant", "content": "SELECT COUNT(\"2nd_leg\") FROM \"winners_knockout\" WHERE \"aggregate\"='2-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: How many home (2nd leg) had a 1st leg 1-1?" }, { "role": "assistant", "content": "SELECT COUNT(\"home_2nd_leg\") FROM \"winners_knockout\" WHERE \"1st_leg\"='1-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: How many 2nd legs are there where home (1st leg) is Independiente?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"winners_knockout\" WHERE \"home_1st_leg\"='Independiente';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: Who was in home (2nd leg) when Talleres was in home (1st leg)" }, { "role": "assistant", "content": "SELECT \"home_2nd_leg\" FROM \"winners_knockout\" WHERE \"home_1st_leg\"='Talleres';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: Who was in 2nd leg when Boca Juniors was in home (1st leg)?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"winners_knockout\" WHERE \"home_1st_leg\"='Boca Juniors';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_version\" (\n \"cast\" text,\n \"1951_bbc\" text,\n \"1957_bbc\" text,\n \"1968_bbc\" text,\n \"1970_film\" text,\n \"2000_carlton_television\" text\n);\n\nQuestion: Name the 1968 bbc for 1957 bbc anneke wills" }, { "role": "assistant", "content": "SELECT \"1968_bbc\" FROM \"2000_version\" WHERE \"1957_bbc\"='Anneke Wills';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_version\" (\n \"cast\" text,\n \"1951_bbc\" text,\n \"1957_bbc\" text,\n \"1968_bbc\" text,\n \"1970_film\" text,\n \"2000_carlton_television\" text\n);\n\nQuestion: Name the 2000 carlton television for 1951 bbc john stuart" }, { "role": "assistant", "content": "SELECT \"2000_carlton_television\" FROM \"2000_version\" WHERE \"1951_bbc\"='John Stuart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_version\" (\n \"cast\" text,\n \"1951_bbc\" text,\n \"1957_bbc\" text,\n \"1968_bbc\" text,\n \"1970_film\" text,\n \"2000_carlton_television\" text\n);\n\nQuestion: Name the cast for 1957 bcc for jean anderson" }, { "role": "assistant", "content": "SELECT \"cast\" FROM \"2000_version\" WHERE \"1957_bbc\"='Jean Anderson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_version\" (\n \"cast\" text,\n \"1951_bbc\" text,\n \"1957_bbc\" text,\n \"1968_bbc\" text,\n \"1970_film\" text,\n \"2000_carlton_television\" text\n);\n\nQuestion: Name the 1970 film when 1951 bbc is michael croudson" }, { "role": "assistant", "content": "SELECT \"1970_film\" FROM \"2000_version\" WHERE \"1951_bbc\"='Michael Croudson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_version\" (\n \"cast\" text,\n \"1951_bbc\" text,\n \"1957_bbc\" text,\n \"1968_bbc\" text,\n \"1970_film\" text,\n \"2000_carlton_television\" text\n);\n\nQuestion: Name the cast for 1951 bbc being carole lorimer" }, { "role": "assistant", "content": "SELECT \"cast\" FROM \"2000_version\" WHERE \"1951_bbc\"='Carole Lorimer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_version\" (\n \"cast\" text,\n \"1951_bbc\" text,\n \"1957_bbc\" text,\n \"1968_bbc\" text,\n \"1970_film\" text,\n \"2000_carlton_television\" text\n);\n\nQuestion: Name the 1970 film for when 1968 being neil mcdermott" }, { "role": "assistant", "content": "SELECT \"1970_film\" FROM \"2000_version\" WHERE \"1968_bbc\"='Neil McDermott';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: Name the playoffs for 2nd round open cup" }, { "role": "assistant", "content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"open_cup\"='2nd 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\" (\n \"year\" real,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"us_open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: What was the regular season standings for the year when the playoffs reached the conference semifinals and the team did not qualify for the US Open Cup?" }, { "role": "assistant", "content": "SELECT \"reg_season\" FROM \"year_by_year\" WHERE \"playoffs\"='Conference Semifinals' AND \"us_open_cup\"='Did not qualify';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_division\" (\n \"s_car_plate_starting_1937\" text,\n \"voivodeship_or_city\" text,\n \"capital\" text,\n \"area_1930_in_1_000skm_2\" text,\n \"population_1931_in_1_000s\" text\n);\n\nQuestion: Name the population in 1931 for lubelskie" }, { "role": "assistant", "content": "SELECT \"population_1931_in_1_000s\" FROM \"administrative_division\" WHERE \"voivodeship_or_city\"='lubelskie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_division\" (\n \"s_car_plate_starting_1937\" text,\n \"voivodeship_or_city\" text,\n \"capital\" text,\n \"area_1930_in_1_000skm_2\" text,\n \"population_1931_in_1_000s\" text\n);\n\nQuestion: Name the s car starting 1937 when area 1930 is 16.5" }, { "role": "assistant", "content": "SELECT \"s_car_plate_starting_1937\" FROM \"administrative_division\" WHERE \"area_1930_in_1_000skm_2\"='16.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_division\" (\n \"s_car_plate_starting_1937\" text,\n \"voivodeship_or_city\" text,\n \"capital\" text,\n \"area_1930_in_1_000skm_2\" text,\n \"population_1931_in_1_000s\" text\n);\n\nQuestion: Name the population when the capital is tarnopol" }, { "role": "assistant", "content": "SELECT \"population_1931_in_1_000s\" FROM \"administrative_division\" WHERE \"capital\"='Tarnopol';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_division\" (\n \"s_car_plate_starting_1937\" text,\n \"voivodeship_or_city\" text,\n \"capital\" text,\n \"area_1930_in_1_000skm_2\" text,\n \"population_1931_in_1_000s\" text\n);\n\nQuestion: Name the s car plate starting 1937 for area 1930 being 22.2" }, { "role": "assistant", "content": "SELECT \"s_car_plate_starting_1937\" FROM \"administrative_division\" WHERE \"area_1930_in_1_000skm_2\"='22.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14249278_1\" (\n \"bit_15\" real,\n \"bits_14_12\" real,\n \"bits_11_0\" text,\n \"mnemonic\" text,\n \"description\" text\n);\n\nQuestion: Name the most bits 14-12 for output from accumulator to character bus" }, { "role": "assistant", "content": "SELECT MIN(\"bits_14_12\") FROM \"table1_14249278_1\" WHERE \"description\"='Output from accumulator to character bus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1425948_1\" (\n \"chassis_manufacturer\" text,\n \"chassis_model\" text,\n \"body_model\" text,\n \"number_in_fleet\" real,\n \"fleet_numbers\" text\n);\n\nQuestion: what is smallest number in fleet for chassis manufacturer Scania and fleet numbers is 3230?" }, { "role": "assistant", "content": "SELECT MIN(\"number_in_fleet\") FROM \"table1_1425948_1\" WHERE \"chassis_manufacturer\"='Scania' AND \"fleet_numbers\"='3230';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1425948_1\" (\n \"chassis_manufacturer\" text,\n \"chassis_model\" text,\n \"body_model\" text,\n \"number_in_fleet\" real,\n \"fleet_numbers\" text\n);\n\nQuestion: Which chassis manufacturer is for fleet numbers range 2530-2558" }, { "role": "assistant", "content": "SELECT \"chassis_manufacturer\" FROM \"table1_1425948_1\" WHERE \"fleet_numbers\"='2530-2558';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1425948_1\" (\n \"chassis_manufacturer\" text,\n \"chassis_model\" text,\n \"body_model\" text,\n \"number_in_fleet\" real,\n \"fleet_numbers\" text\n);\n\nQuestion: Chassis model Scania K360ua has what minimum number in fleet?" }, { "role": "assistant", "content": "SELECT MIN(\"number_in_fleet\") FROM \"table1_1425948_1\" WHERE \"chassis_model\"='Scania K360UA';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"module_specifications\" (\n \"designation\" text,\n \"bus_width_bits\" real,\n \"channels\" text,\n \"clock_rate_m_hz\" real,\n \"bandwidth_mb_s\" real\n);\n\nQuestion: Name the channels when designation is pc700" }, { "role": "assistant", "content": "SELECT \"channels\" FROM \"module_specifications\" WHERE \"designation\"='PC700';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"module_specifications\" (\n \"designation\" text,\n \"bus_width_bits\" real,\n \"channels\" text,\n \"clock_rate_m_hz\" real,\n \"bandwidth_mb_s\" real\n);\n\nQuestion: Name the maximum clock rate mhz" }, { "role": "assistant", "content": "SELECT MAX(\"clock_rate_m_hz\") FROM \"module_specifications\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"module_specifications\" (\n \"designation\" text,\n \"bus_width_bits\" real,\n \"channels\" text,\n \"clock_rate_m_hz\" real,\n \"bandwidth_mb_s\" real\n);\n\nQuestion: Name the bus width bits when bandwidth mb/s is 3200" }, { "role": "assistant", "content": "SELECT \"bus_width_bits\" FROM \"module_specifications\" WHERE \"bandwidth_mb_s\"=3200;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"module_specifications\" (\n \"designation\" text,\n \"bus_width_bits\" real,\n \"channels\" text,\n \"clock_rate_m_hz\" real,\n \"bandwidth_mb_s\" real\n);\n\nQuestion: Name the least clock rate mhz" }, { "role": "assistant", "content": "SELECT MIN(\"clock_rate_m_hz\") FROM \"module_specifications\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"module_specifications\" (\n \"designation\" text,\n \"bus_width_bits\" real,\n \"channels\" text,\n \"clock_rate_m_hz\" real,\n \"bandwidth_mb_s\" real\n);\n\nQuestion: Name the least clock rate mhz when designation is rimm 4200" }, { "role": "assistant", "content": "SELECT MIN(\"clock_rate_m_hz\") FROM \"module_specifications\" WHERE \"designation\"='RIMM 4200';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"module_specifications\" (\n \"designation\" text,\n \"bus_width_bits\" real,\n \"channels\" text,\n \"clock_rate_m_hz\" real,\n \"bandwidth_mb_s\" real\n);\n\nQuestion: Name the number of clock rate mhz when bandwidth mb/s is 2400" }, { "role": "assistant", "content": "SELECT COUNT(\"clock_rate_m_hz\") FROM \"module_specifications\" WHERE \"bandwidth_mb_s\"=2400;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elementary_schools_grades_k_6\" (\n \"elementary_schools\" text,\n \"mascot\" text,\n \"address\" text,\n \"principal_2013_2014\" text,\n \"assistant_principal_2013_2014\" text\n);\n\nQuestion: Which elementary schools list Cort Monroe as the principal from 2013 to 2014?" }, { "role": "assistant", "content": "SELECT \"elementary_schools\" FROM \"elementary_schools_grades_k_6\" WHERE \"principal_2013_2014\"='Cort Monroe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elementary_schools_grades_k_6\" (\n \"elementary_schools\" text,\n \"mascot\" text,\n \"address\" text,\n \"principal_2013_2014\" text,\n \"assistant_principal_2013_2014\" text\n);\n\nQuestion: Who are all the assistant principals that served from 2013-2014 under the principal Cort Monroe?" }, { "role": "assistant", "content": "SELECT \"assistant_principal_2013_2014\" FROM \"elementary_schools_grades_k_6\" WHERE \"principal_2013_2014\"='Cort Monroe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14263158_3\" (\n \"competition\" text,\n \"stage\" text,\n \"result\" text,\n \"opponent\" text,\n \"position\" text,\n \"scorers\" text\n);\n\nQuestion: Who played in the series that resulted in matches with the following scores: 0\u20133 0\u20138 0\u20131 0\u20132 0\u20133 1\u20134 0\u20139 0\u20135?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"table1_14263158_3\" WHERE \"result\"='0\u20133 0\u20138 0\u20131 0\u20132 0\u20133 1\u20134 0\u20139 0\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"2011_census\" real,\n \"2006_census\" real,\n \"pct_change\" text,\n \"land_area_km\" text,\n \"density_pop_km\" text,\n \"population_rank\" real\n);\n\nQuestion: Where was there a change of 6.5%?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"references\" WHERE \"pct_change\"='6.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"2011_census\" real,\n \"2006_census\" real,\n \"pct_change\" text,\n \"land_area_km\" text,\n \"density_pop_km\" text,\n \"population_rank\" real\n);\n\nQuestion: When the change is 8.8%, what is the density (pop/km\u00b2)?" }, { "role": "assistant", "content": "SELECT \"density_pop_km\" FROM \"references\" WHERE \"pct_change\"='8.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"2011_census\" real,\n \"2006_census\" real,\n \"pct_change\" text,\n \"land_area_km\" text,\n \"density_pop_km\" text,\n \"population_rank\" real\n);\n\nQuestion: How many locations had a density (pop/km\u00b2) of 91.8 in the 2011 census?" }, { "role": "assistant", "content": "SELECT COUNT(\"2011_census\") FROM \"references\" WHERE \"density_pop_km\"='91.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"2011_census\" real,\n \"2006_census\" real,\n \"pct_change\" text,\n \"land_area_km\" text,\n \"density_pop_km\" text,\n \"population_rank\" real\n);\n\nQuestion: When the 2006 census had a population of 422204, what was the density (pop/km\u00b2) ?" }, { "role": "assistant", "content": "SELECT COUNT(\"density_pop_km\") FROM \"references\" WHERE \"2006_census\"=422204;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"2011_census\" real,\n \"2006_census\" real,\n \"pct_change\" text,\n \"land_area_km\" text,\n \"density_pop_km\" text,\n \"population_rank\" real\n);\n\nQuestion: When the % change is 8.4, what is the population rank?" }, { "role": "assistant", "content": "SELECT MIN(\"population_rank\") FROM \"references\" WHERE \"pct_change\"='8.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"2011_census\" real,\n \"2006_census\" real,\n \"pct_change\" text,\n \"land_area_km\" text,\n \"density_pop_km\" text,\n \"population_rank\" real\n);\n\nQuestion: When the population rank is 34, what the is % change?" }, { "role": "assistant", "content": "SELECT \"pct_change\" FROM \"references\" WHERE \"population_rank\"=34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_results_record\" (\n \"team\" text,\n \"first_played\" real,\n \"played\" real,\n \"win\" real,\n \"draw\" real,\n \"loss\" real,\n \"points_for\" real,\n \"ponts_against\" real,\n \"last_meeting\" real\n);\n\nQuestion: How many teams scored exactly 38 points" }, { "role": "assistant", "content": "SELECT COUNT(\"team\") FROM \"all_time_results_record\" WHERE \"points_for\"=38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_results_record\" (\n \"team\" text,\n \"first_played\" real,\n \"played\" real,\n \"win\" real,\n \"draw\" real,\n \"loss\" real,\n \"points_for\" real,\n \"ponts_against\" real,\n \"last_meeting\" real\n);\n\nQuestion: In what year did Italy begin playing?" }, { "role": "assistant", "content": "SELECT MIN(\"first_played\") FROM \"all_time_results_record\" WHERE \"team\"='Italy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_results_record\" (\n \"team\" text,\n \"first_played\" real,\n \"played\" real,\n \"win\" real,\n \"draw\" real,\n \"loss\" real,\n \"points_for\" real,\n \"ponts_against\" real,\n \"last_meeting\" real\n);\n\nQuestion: For teams that played 5 games, what was the smallest number of wins?" }, { "role": "assistant", "content": "SELECT MIN(\"win\") FROM \"all_time_results_record\" WHERE \"played\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_results_record\" (\n \"team\" text,\n \"first_played\" real,\n \"played\" real,\n \"win\" real,\n \"draw\" real,\n \"loss\" real,\n \"points_for\" real,\n \"ponts_against\" real,\n \"last_meeting\" real\n);\n\nQuestion: How many games did the team that began in 2011 and scored 36 points play?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"all_time_results_record\" WHERE \"first_played\"=2011 AND \"points_for\"=36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What are all the run times with 8.2 million viewers?" }, { "role": "assistant", "content": "SELECT \"run_time\" FROM \"serial_details_by_episode\" WHERE \"viewers_in_millions\"='8.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What are all the episodes with an episode run time of 24:01?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"serial_details_by_episode\" WHERE \"run_time\"='24:01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: How many episodes had a broadcast date and run time of 24:43?" }, { "role": "assistant", "content": "SELECT COUNT(\"broadcast_date\") FROM \"serial_details_by_episode\" WHERE \"run_time\"='24:43';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"established\" real,\n \"gained_university_status\" real,\n \"vice_chancellor\" text,\n \"total_number_of_students\" real,\n \"research_funding_000\" real\n);\n\nQuestion: How many members gained university status in 1900?" }, { "role": "assistant", "content": "SELECT COUNT(\"research_funding_000\") FROM \"members\" WHERE \"gained_university_status\"=1900;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"established\" real,\n \"gained_university_status\" real,\n \"vice_chancellor\" text,\n \"total_number_of_students\" real,\n \"research_funding_000\" real\n);\n\nQuestion: What is the largest number of students?" }, { "role": "assistant", "content": "SELECT MAX(\"total_number_of_students\") FROM \"members\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"established\" real,\n \"gained_university_status\" real,\n \"vice_chancellor\" text,\n \"total_number_of_students\" real,\n \"research_funding_000\" real\n);\n\nQuestion: How many members have professor edward acton as vice-chancellor?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_number_of_students\") FROM \"members\" WHERE \"vice_chancellor\"='Professor Edward Acton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"established\" real,\n \"gained_university_status\" real,\n \"vice_chancellor\" text,\n \"total_number_of_students\" real,\n \"research_funding_000\" real\n);\n\nQuestion: What is the year leicester was established?" }, { "role": "assistant", "content": "SELECT MAX(\"established\") FROM \"members\" WHERE \"location\"='Leicester';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replaced_pageants\" (\n \"country_territory\" text,\n \"former_pageant\" text,\n \"last_competed\" real,\n \"new_pageant\" text,\n \"franchise_since\" real\n);\n\nQuestion: which country has miss universe Hungary as former pageant?" }, { "role": "assistant", "content": "SELECT \"country_territory\" FROM \"replaced_pageants\" WHERE \"former_pageant\"='Miss Universe Hungary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replaced_pageants\" (\n \"country_territory\" text,\n \"former_pageant\" text,\n \"last_competed\" real,\n \"new_pageant\" text,\n \"franchise_since\" real\n);\n\nQuestion: which is the former pageant in the country where the new pageant is miss bahamas?" }, { "role": "assistant", "content": "SELECT \"former_pageant\" FROM \"replaced_pageants\" WHERE \"new_pageant\"='Miss Bahamas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"replaced_pageants\" (\n \"country_territory\" text,\n \"former_pageant\" text,\n \"last_competed\" real,\n \"new_pageant\" text,\n \"franchise_since\" real\n);\n\nQuestion: when did new zealand last compete?" }, { "role": "assistant", "content": "SELECT MAX(\"last_competed\") FROM \"replaced_pageants\" WHERE \"country_territory\"='New Zealand';" } ]