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 \"other_awards\" (\n \"year\" real,\n \"award\" text,\n \"nominee\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What award has a year earlier than 2004 and the episode shows \u2014?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"other_awards\" WHERE \"year\"<2004 AND \"episode\"='\u2014';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_awards\" (\n \"year\" real,\n \"award\" text,\n \"nominee\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What award has a year later than 2004, and the episode was \"The Road to Damuscus\"?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"other_awards\" WHERE \"year\">2004 AND \"episode\"='\\\"the road to damuscus\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_awards\" (\n \"year\" real,\n \"award\" text,\n \"nominee\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What year has a Nominee of \u2014, and a Result of nominated?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"other_awards\" WHERE \"nominee\"='\u2014' AND \"result\"='nominated';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What is the Country of the Play Electra?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"play\"='electra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What is the Athens Base play with Dance Theatre Roes Company?" }, { "role": "assistant", "content": "SELECT \"play\" FROM \"references\" WHERE \"base\"='athens' AND \"company\"='dance theatre roes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Who is the author of the Play Electra?" }, { "role": "assistant", "content": "SELECT \"author\" FROM \"references\" WHERE \"play\"='electra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: Waht is the Country of the play by Author Aristophanes?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"author\"='aristophanes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"play\" text,\n \"author\" text,\n \"company\" text,\n \"base\" text,\n \"country\" text\n);\n\nQuestion: What Country has the Play The Libation Bearers a Base of Mecklenburg?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"base\"='mecklenburg' AND \"play\"='the libation bearers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1957\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: Which series had a title of Boyhood Daze?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1957\" WHERE \"title\"='boyhood daze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1957\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: What was the release date of Rabbit Romeo?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1957\" WHERE \"title\"='rabbit romeo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1957\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: What was the release date of Three Little Bops?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1957\" WHERE \"title\"='three little bops';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"lpga_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real,\n \"average\" real\n);\n\nQuestion: When earnings ($) is more than 583,796 after 1998 with 1 LPGA wins and greater than 10 Money list rank, what is the smallest average?" }, { "role": "assistant", "content": "SELECT MIN(\"average\") FROM \"lpga_tour_career_summary\" WHERE \"year\">1998 AND \"earnings\">'583,796' AND \"lpga_wins\"=1 AND \"money_list_rank\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"lpga_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real,\n \"average\" real\n);\n\nQuestion: In 2005 the earnings is less than 615,499 with less than 2 LPGA wins and what smallest Money list rank?" }, { "role": "assistant", "content": "SELECT MIN(\"money_list_rank\") FROM \"lpga_tour_career_summary\" WHERE \"lpga_wins\"<2 AND \"year\"=2005 AND \"earnings\"<'615,499';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"lpga_wins\" real,\n \"earnings\" real,\n \"money_list_rank\" real,\n \"average\" real\n);\n\nQuestion: What is the sum of money list rank after 1999 when the average is less than 73.27 and earnings is 583,796?" }, { "role": "assistant", "content": "SELECT COUNT(\"money_list_rank\") FROM \"lpga_tour_career_summary\" WHERE \"average\"<73.27 AND \"earnings\"='583,796' AND \"year\">1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_counference\" text\n);\n\nQuestion: What is the team name from Hammond Bishop Noll?" }, { "role": "assistant", "content": "SELECT \"team_name\" FROM \"membership\" WHERE \"school\"='hammond bishop noll';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_counference\" text\n);\n\nQuestion: What city has a team in IHSAA class 3a, and previous conference of lake?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"membership\" WHERE \"previous_counference\"='lake' AND \"ihsaa_class\"='3a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_counference\" text\n);\n\nQuestion: What is the average enrollment 08=09, for the team that had a previous conference of lake and IHSAA class of 3A?" }, { "role": "assistant", "content": "SELECT AVG(\"enrollment_08_09\") FROM \"membership\" WHERE \"previous_counference\"='lake' AND \"ihsaa_class\"='3a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_25\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Date of the Kroger Classic Tournament?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"champions_tour_wins_25\" WHERE \"tournament\"='kroger classic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_25\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Date of the Ameritech Senior Open?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"champions_tour_wins_25\" WHERE \"tournament\"='ameritech senior open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_25\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What Tournament has a Winning score of \u221216 (66-64-67=197)?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"champions_tour_wins_25\" WHERE \"winning_score\"='\u221216 (66-64-67=197)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"celestial_stem\" text,\n \"chinese_mandarin_pinyin\" text,\n \"cantonese_jyutping\" text,\n \"wuu_wuupin\" text,\n \"japanese_kunyomi\" text,\n \"japanese_on_yomi\" text,\n \"korean_rr\" text,\n \"manchu_m_llendorff\" text,\n \"vietnamese\" text,\n \"yin_and_yang\" text,\n \"wu_xing\" text,\n \"wu_xing_correlations\" text\n);\n\nQuestion: What Japanese On'yomi has Catonese Jyutping of jyut6?" }, { "role": "assistant", "content": "SELECT \"japanese_on_yomi\" FROM \"table\" WHERE \"cantonese_jyutping\"='jyut6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"celestial_stem\" text,\n \"chinese_mandarin_pinyin\" text,\n \"cantonese_jyutping\" text,\n \"wuu_wuupin\" text,\n \"japanese_kunyomi\" text,\n \"japanese_on_yomi\" text,\n \"korean_rr\" text,\n \"manchu_m_llendorff\" text,\n \"vietnamese\" text,\n \"yin_and_yang\" text,\n \"wu_xing\" text,\n \"wu_xing_correlations\" text\n);\n\nQuestion: What Japanese On'yomi has Vietnamese of M\u1eadu?" }, { "role": "assistant", "content": "SELECT \"japanese_on_yomi\" FROM \"table\" WHERE \"vietnamese\"='m\u1eadu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"celestial_stem\" text,\n \"chinese_mandarin_pinyin\" text,\n \"cantonese_jyutping\" text,\n \"wuu_wuupin\" text,\n \"japanese_kunyomi\" text,\n \"japanese_on_yomi\" text,\n \"korean_rr\" text,\n \"manchu_m_llendorff\" text,\n \"vietnamese\" text,\n \"yin_and_yang\" text,\n \"wu_xing\" text,\n \"wu_xing_correlations\" text\n);\n\nQuestion: What is Wu Xing (\u4e94\u884c) with Korean (RR) of \uc784 (im)?" }, { "role": "assistant", "content": "SELECT \"wu_xing\" FROM \"table\" WHERE \"korean_rr\"='\uc784 (im)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"celestial_stem\" text,\n \"chinese_mandarin_pinyin\" text,\n \"cantonese_jyutping\" text,\n \"wuu_wuupin\" text,\n \"japanese_kunyomi\" text,\n \"japanese_on_yomi\" text,\n \"korean_rr\" text,\n \"manchu_m_llendorff\" text,\n \"vietnamese\" text,\n \"yin_and_yang\" text,\n \"wu_xing\" text,\n \"wu_xing_correlations\" text\n);\n\nQuestion: What's Manchu (M\u00f6llendorff) with the Wi Xing Correltation of \u5357 South, along with Wuu Wuupin of ting44?" }, { "role": "assistant", "content": "SELECT \"manchu_m_llendorff\" FROM \"table\" WHERE \"wu_xing_correlations\"='\u5357 south' AND \"wuu_wuupin\"='ting44';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2005_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"theme_song_s\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which Japanese Title has a TV Station of ntv?" }, { "role": "assistant", "content": "SELECT \"japanese_title\" FROM \"2005_spring_season\" WHERE \"tv_station\"='ntv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2005_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"theme_song_s\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which TV Station has a Romaji Title of kegareta shita?" }, { "role": "assistant", "content": "SELECT \"tv_station\" FROM \"2005_spring_season\" WHERE \"romaji_title\"='kegareta shita';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2005_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"theme_song_s\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which Theme Song(s) has a Japanese Title of \u604b\u306b\u304a\u3061\u305f\u3089\uff5e\u50d5\u306e\u6210\u529f\u306e\u79d8\u5bc6\uff5e?" }, { "role": "assistant", "content": "SELECT \"theme_song_s\" FROM \"2005_spring_season\" WHERE \"japanese_title\"='\u604b\u306b\u304a\u3061\u305f\u3089\uff5e\u50d5\u306e\u6210\u529f\u306e\u79d8\u5bc6\uff5e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: Churai has what as the fewest number of electorates?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_electorates_2009\") FROM \"assembly_segments\" WHERE \"name\"='churai';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1938\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: what is the title when the release date is 1938-12-17 and the production number is 8610?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"1938\" WHERE \"release_date\"='1938-12-17' AND \"production_num\"='8610';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_0_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: The match played July 8, 2007 had what outcome?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"singles_0_7\" WHERE \"date\"='july 8, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_0_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: The final match played against Evie Dominikovic was played on what surface?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_0_7\" WHERE \"opponent_in_the_final\"='evie dominikovic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_0_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Olga Blahotov\u00e1 was the opponent in the final at what tournament?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_0_7\" WHERE \"opponent_in_the_final\"='olga blahotov\u00e1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_0_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: In the final against Ashley Harkleroad what was the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_0_7\" WHERE \"opponent_in_the_final\"='ashley harkleroad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the name for the 2008 club Liaoning?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='liaoning';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the height for the Tianjin members in 2008?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='tianjin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: At what time did the opponent Takaichi Hirayama have an event?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='takaichi hirayama';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: In which round was Gabriel Veiga the opponent?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='gabriel veiga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which method had a 3 rounds, result in a loss and the Juiz de Fora - fight 1 event?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='3' AND \"res\"='loss' AND \"event\"='juiz de fora - fight 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which opponent has a record of 4-2?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='4-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the Reserved for when there are more than 161,219 electorates in 2009 and a constituency of 160?" }, { "role": "assistant", "content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"number_of_electorates_2009\">'161,219' AND \"constituency_number\"='160';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the name when there are more than 161,219 electorates in 2009 and a constituency of 165?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"assembly_segments\" WHERE \"number_of_electorates_2009\">'161,219' AND \"constituency_number\"='165';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the country for zhang xiuyun?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"quarterfinal_3\" WHERE \"athlete\"='zhang xiuyun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the country for fabiana beltrame?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"quarterfinal_3\" WHERE \"athlete\"='fabiana beltrame';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the notes when the time is 7:58.71?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"quarterfinal_3\" WHERE \"time\"='7:58.71';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the highest rank when the time is 7:52.65?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"quarterfinal_3\" WHERE \"time\"='7:52.65';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"quarterfinal_3\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: what is the country when the nots is sa/b, the rank is more than 1 and the athlete is zhang xiuyun?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"quarterfinal_3\" WHERE \"notes\"='sa/b' AND \"rank\">1 AND \"athlete\"='zhang xiuyun';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualification_round\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"day_1\" real,\n \"total\" text\n);\n\nQuestion: Who had a rank under 17 with a total of 119?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"qualification_round\" WHERE \"rank\"<17 AND \"total\"='119';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What round has 2-1 as the result, and A as the venue?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"league_cup\" WHERE \"result\"='2-1' AND \"venue\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the most time for the swimmer from South Africa who was in a lane greater than 3?" }, { "role": "assistant", "content": "SELECT MAX(\"time\") FROM \"semifinal_2\" WHERE \"nationality\"='south africa' AND \"lane\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Which school has enrollment of 887?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\"=887;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: what is the round when the pick # is less than 236 and the position is offensive guard?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"nfl_draft\" WHERE \"pick_num\"<236 AND \"position\"='offensive guard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: what is the position in round 3?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"round\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_selections\" (\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the Position of the Pick 8 Player?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_selections\" WHERE \"pick\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which High assists has a Score of w 71-56?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"regular_season\" WHERE \"score\"='w 71-56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which Score has a High assists of whalen (5)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"high_assists\"='whalen (5)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which High rebounds has a Game smaller than 9, and a Opponent of detroit?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"regular_season\" WHERE \"game\"<9 AND \"opponent\"='detroit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which High rebounds has a Score of w 81-69?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"regular_season\" WHERE \"score\"='w 81-69';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_5_matches_by_atp_world_tour_com\" (\n \"event\" real,\n \"round\" text,\n \"surface\" text,\n \"winner\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which Surface has a Result of fernando verdasco?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"best_5_matches_by_atp_world_tour_com\" WHERE \"result\"='fernando verdasco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_5_matches_by_atp_world_tour_com\" (\n \"event\" real,\n \"round\" text,\n \"surface\" text,\n \"winner\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: How many events did clay win?" }, { "role": "assistant", "content": "SELECT COUNT(\"event\") FROM \"best_5_matches_by_atp_world_tour_com\" WHERE \"winner\"='clay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_5_matches_by_atp_world_tour_com\" (\n \"event\" real,\n \"round\" text,\n \"surface\" text,\n \"winner\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which Surface has an Opponent of rafael nadal, and an Event of 2?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"best_5_matches_by_atp_world_tour_com\" WHERE \"opponent\"='rafael nadal' AND \"event\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_5_matches_by_atp_world_tour_com\" (\n \"event\" real,\n \"round\" text,\n \"surface\" text,\n \"winner\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Who is iv\u00e1n navarro's opponent?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"best_5_matches_by_atp_world_tour_com\" WHERE \"result\"='iv\u00e1n navarro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_5_matches_by_atp_world_tour_com\" (\n \"event\" real,\n \"round\" text,\n \"surface\" text,\n \"winner\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which Event has a Surface of semifinal, and a Winner of hard (i)?" }, { "role": "assistant", "content": "SELECT MAX(\"event\") FROM \"best_5_matches_by_atp_world_tour_com\" WHERE \"surface\"='semifinal' AND \"winner\"='hard (i)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_in_tour_de_france_since_1947\" (\n \"year\" real,\n \"stage\" real,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: Who was the leader at the summit earlier than 1956, when Carcassonne shows for finish?" }, { "role": "assistant", "content": "SELECT \"leader_at_the_summit\" FROM \"appearances_in_tour_de_france_since_1947\" WHERE \"year\"<1956 AND \"finish\"='carcassonne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_in_tour_de_france_since_1947\" (\n \"year\" real,\n \"stage\" real,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: What year was finish Toulouse, and stage was larger than 12?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"appearances_in_tour_de_france_since_1947\" WHERE \"finish\"='toulouse' AND \"stage\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_in_tour_de_france_since_1947\" (\n \"year\" real,\n \"stage\" real,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: What is the highest stage number for a year later than 1948, leader at the summit was group, and finish was Bagn\u00e8res-De-Bigorre?" }, { "role": "assistant", "content": "SELECT MAX(\"stage\") FROM \"appearances_in_tour_de_france_since_1947\" WHERE \"year\">1948 AND \"leader_at_the_summit\"='group' AND \"finish\"='bagn\u00e8res-de-bigorre';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successor_s_formal_installation\" text\n);\n\nQuestion: which Vacator has a Reason for change of resigned november 10, 1965?" }, { "role": "assistant", "content": "SELECT \"vacator\" FROM \"senate\" WHERE \"reason_for_change\"='resigned november 10, 1965';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successor_s_formal_installation\" text\n);\n\nQuestion: Which Reason has a State (class) of tennessee (2)?" }, { "role": "assistant", "content": "SELECT \"reason_for_change\" FROM \"senate\" WHERE \"state_class\"='tennessee (2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successor_s_formal_installation\" text\n);\n\nQuestion: When is it that successor's formal installation has a Vacator of ross bass (d)?" }, { "role": "assistant", "content": "SELECT \"date_of_successor_s_formal_installation\" FROM \"senate\" WHERE \"vacator\"='ross bass (d)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successor_s_formal_installation\" text\n);\n\nQuestion: Which State (class) has a Successor of harry f. byrd, jr. (d)? Question" }, { "role": "assistant", "content": "SELECT \"state_class\" FROM \"senate\" WHERE \"successor\"='harry f. byrd, jr. (d)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successor_s_formal_installation\" text\n);\n\nQuestion: Which date of Date of successor's formal installation has a State (class) of michigan (2)?" }, { "role": "assistant", "content": "SELECT \"date_of_successor_s_formal_installation\" FROM \"senate\" WHERE \"state_class\"='michigan (2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"surrounding\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: Which country has a Col (m) of 1374?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"surrounding\" WHERE \"col_m\"=1374;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: How many Games have Years at club of 1971\u20131974, and a Debut year larger than 1971?" }, { "role": "assistant", "content": "SELECT SUM(\"games\") FROM \"1970s\" WHERE \"years_at_club\"='1971\u20131974' AND \"debut_year\">1971;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: Which Games have Years at club of 1974\u20131975, and Goals of 4?" }, { "role": "assistant", "content": "SELECT AVG(\"games\") FROM \"1970s\" WHERE \"years_at_club\"='1974\u20131975' AND \"goals\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: Which Years at club have Games smaller than 7, and Goals larger than 2, and a Player of john frazer?" }, { "role": "assistant", "content": "SELECT \"years_at_club\" FROM \"1970s\" WHERE \"games\"<7 AND \"goals\">2 AND \"player\"='john frazer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: Which Games have Years at club of 1977, and Goals of 17, and a Debut year smaller than 1977?" }, { "role": "assistant", "content": "SELECT AVG(\"games\") FROM \"1970s\" WHERE \"years_at_club\"='1977' AND \"goals\"=17 AND \"debut_year\"<1977;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"debut_year\" real,\n \"player\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: Which Goals have Games smaller than 41, and a Player of mark amos?" }, { "role": "assistant", "content": "SELECT MIN(\"goals\") FROM \"1970s\" WHERE \"games\"<41 AND \"player\"='mark amos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"result\" text\n);\n\nQuestion: What is Melaine Walker's Rank?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"round_1\" WHERE \"name\"='melaine walker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"result\" text\n);\n\nQuestion: What is the Name of the Player with a Rank of 23 or less, Heat of 4 and Result of 55.91?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"round_1\" WHERE \"heat\"=4 AND \"rank\"<23 AND \"result\"='55.91';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rank\" real,\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"result\" text\n);\n\nQuestion: What is the Heat of the Player with a Rank of 18 or less and Result of 55.15?" }, { "role": "assistant", "content": "SELECT \"heat\" FROM \"round_1\" WHERE \"rank\"<18 AND \"result\"='55.15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mallet_and_simple_articulated_locomotive\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"serial_numbers\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What is the quantity preserved for fleet number(s) 3000\u20133015?" }, { "role": "assistant", "content": "SELECT \"quantity_preserved\" FROM \"mallet_and_simple_articulated_locomotive\" WHERE \"fleet_number_s\"='3000\u20133015';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mallet_and_simple_articulated_locomotive\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"serial_numbers\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What manufacturer has a wheel arrangement of 4-6-6-4, and a Class of z-7?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"mallet_and_simple_articulated_locomotive\" WHERE \"wheel_arrangement\"='4-6-6-4' AND \"class\"='z-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mallet_and_simple_articulated_locomotive\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"serial_numbers\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What is the Year for fleet number 5000?" }, { "role": "assistant", "content": "SELECT \"year_made\" FROM \"mallet_and_simple_articulated_locomotive\" WHERE \"fleet_number_s\"='5000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mallet_and_simple_articulated_locomotive\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"serial_numbers\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What year made has a Quantity made of 4?" }, { "role": "assistant", "content": "SELECT \"year_made\" FROM \"mallet_and_simple_articulated_locomotive\" WHERE \"quantity_made\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mallet_and_simple_articulated_locomotive\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"serial_numbers\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What is the quantity preserved for the serial number of mallet and simple articulated locomotives?" }, { "role": "assistant", "content": "SELECT \"quantity_preserved\" FROM \"mallet_and_simple_articulated_locomotive\" WHERE \"serial_numbers\"='mallet and simple articulated locomotives';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals did Estonia, which won more than 1 gold and less than 97 medals total, win?" }, { "role": "assistant", "content": "SELECT \"silver\" FROM \"world_championships_total_medals\" WHERE \"gold\">1 AND \"total\"<97 AND \"nation\"='estonia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals did Denmark win?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"world_championships_total_medals\" WHERE \"nation\"='denmark';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals won among nations that won more than 27 bronze and less than 305 medals total?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"world_championships_total_medals\" WHERE \"bronze\">27 AND \"total\"<305;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals were won by the nation that won over 4 silver medals, over 14 bronze, and 97 medals total?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"world_championships_total_medals\" WHERE \"silver\">4 AND \"bronze\">14 AND \"total\"=97;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" text\n);\n\nQuestion: What is the highest championship that has 1 as the league cup, and 17 as the total?" }, { "role": "assistant", "content": "SELECT MAX(\"championship\") FROM \"goalscorers\" WHERE \"league_cup\"=1 AND \"total\"='17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" text\n);\n\nQuestion: How many league cups have an FA Cup less than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"league_cup\") FROM \"goalscorers\" WHERE \"fa_cup\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_attacked\" (\n \"date\" text,\n \"name_of_ship\" text,\n \"flag\" text,\n \"tonnage\" real,\n \"fate\" text\n);\n\nQuestion: On what date was the Brookwood, which weighed over 5,008 tons, attacked?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"ships_attacked\" WHERE \"tonnage\">'5,008' AND \"name_of_ship\"='brookwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average rank of west germany (frg), which has more than 1 silver, less than 11 gold, and 2 bronze medals?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"medal_table\" WHERE \"silver\">1 AND \"gold\"<11 AND \"bronze\"=2 AND \"nation\"='west germany (frg)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"performance\" text,\n \"athlete\" text,\n \"nation\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What's the date when Yelena Isinbayeva for Russia was in Beijing, China?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"women\" WHERE \"nation\"='russia' AND \"place\"='beijing, china' AND \"athlete\"='yelena isinbayeva';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"performance\" text,\n \"athlete\" text,\n \"nation\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What's the performance of Dire Tune?" }, { "role": "assistant", "content": "SELECT \"performance\" FROM \"women\" WHERE \"athlete\"='dire tune';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"performance\" text,\n \"athlete\" text,\n \"nation\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What place had 14:11.15 as the performance?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"women\" WHERE \"performance\"='14:11.15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"performance\" text,\n \"athlete\" text,\n \"nation\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What's the event that had a performance of 14:11.15 by Ethiopia?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"women\" WHERE \"nation\"='ethiopia' AND \"performance\"='14:11.15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"twelfth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the position of the player picked after 94, by the Boston Patriots?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"twelfth_round\" WHERE \"pick\">94 AND \"team\"='boston patriots';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"twelfth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college had the 93 pick?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"twelfth_round\" WHERE \"pick\"=93;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1952\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"characters\" text,\n \"release_date\" text,\n \"reissue\" text\n);\n\nQuestion: Does the Robert McKimson title featuring Bugs Bunny have a reissue?" }, { "role": "assistant", "content": "SELECT \"reissue\" FROM \"1952\" WHERE \"characters\"='bugs bunny' AND \"director\"='robert mckimson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mark_van_bommel_international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What venue has euro 2004 q. as the competition?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"mark_van_bommel_international_goals\" WHERE \"competition\"='euro 2004 q.';" } ]