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 \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" real,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: What is the maximum number of clubs remaining when the league entering at this round was allsvenskan?" }, { "role": "assistant", "content": "SELECT MIN(\"clubs_remaining\") FROM \"teams\" WHERE \"leagues_entering_at_this_round\"='Allsvenskan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" real,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: How many different values of clubs involved were there when the league entering at this round was allsvenskan?" }, { "role": "assistant", "content": "SELECT COUNT(\"clubs_involved\") FROM \"teams\" WHERE \"leagues_entering_at_this_round\"='Allsvenskan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"returning_this_year_after_a_break_of_one\" (\n \"programme\" text,\n \"date_s_of_original_removal\" text,\n \"original_channel_s\" text,\n \"date_of_return\" text,\n \"new_channel_s\" text\n);\n\nQuestion: Which programs were originally broadcast on CITV?" }, { "role": "assistant", "content": "SELECT \"programme\" FROM \"returning_this_year_after_a_break_of_one\" WHERE \"original_channel_s\"='CITV';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"returning_this_year_after_a_break_of_one\" (\n \"programme\" text,\n \"date_s_of_original_removal\" text,\n \"original_channel_s\" text,\n \"date_of_return\" text,\n \"new_channel_s\" text\n);\n\nQuestion: What is the date of return for the program for the program \"Big Brother\"?" }, { "role": "assistant", "content": "SELECT \"date_of_return\" FROM \"returning_this_year_after_a_break_of_one\" WHERE \"programme\"='Big Brother';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29574579_1\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"uk_viewers_million\" text,\n \"share_pct\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes are directed by Jamie Payne?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"table1_29574579_1\" WHERE \"directed_by\"='Jamie Payne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29574579_1\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"uk_viewers_million\" text,\n \"share_pct\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many millions of viewers are listed when the share is 10.8?" }, { "role": "assistant", "content": "SELECT \"uk_viewers_million\" FROM \"table1_29574579_1\" WHERE \"share_pct\"='10.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29574579_1\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"uk_viewers_million\" text,\n \"share_pct\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who is the director when there are 2.70 million viewers?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_29574579_1\" WHERE \"uk_viewers_million\"='2.70';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29574579_1\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"uk_viewers_million\" text,\n \"share_pct\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes have the title \"episode 2\"?" }, { "role": "assistant", "content": "SELECT MIN(\"episode\") FROM \"table1_29574579_1\" WHERE \"title\"='\\\"Episode 2\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29574579_1\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"uk_viewers_million\" text,\n \"share_pct\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes hve 4.50 million viewers?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"table1_29574579_1\" WHERE \"uk_viewers_million\"='4.50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29574579_1\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"uk_viewers_million\" text,\n \"share_pct\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who is the director when the share is 11.8?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_29574579_1\" WHERE \"share_pct\"='11.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29583441_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the episode with production code 57376?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_29583441_1\" WHERE \"production_code\"=57376;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29583441_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the smallest numbered production code listed?" }, { "role": "assistant", "content": "SELECT MIN(\"production_code\") FROM \"table1_29583441_1\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29583441_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What date did the episode that was directed by Christian i. nyby ii originally air on?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_29583441_1\" WHERE \"directed_by\"='Christian I. Nyby II';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29584044_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the original air date of the episode that was number 31 in the series? " }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_29584044_1\" WHERE \"no_in_series\"=31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29584044_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the original air date of the episode that was directed by Bruce Seth Green?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_29584044_1\" WHERE \"directed_by\"='Bruce Seth Green';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29584044_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the episode titled \"Goliath (Part 2)\"?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_29584044_1\" WHERE \"title\"='\\\"Goliath (Part 2)\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29584044_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What number episode in the season was titled \"K.I.T.T. the Cat\"?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_season\") FROM \"table1_29584044_1\" WHERE \"title\"='\\\"K.I.T.T. the Cat\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" text,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: How many times is the couple kerry & daniel?" }, { "role": "assistant", "content": "SELECT COUNT(\"place\") FROM \"average_score_chart\" WHERE \"couple\"='Kerry & Daniel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" text,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: how many times is the total points 128.0?" }, { "role": "assistant", "content": "SELECT COUNT(\"couple\") FROM \"average_score_chart\" WHERE \"total_points\"='128.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" text,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: How many times is the couple laura and colin?" }, { "role": "assistant", "content": "SELECT COUNT(\"place\") FROM \"average_score_chart\" WHERE \"couple\"='Laura and Colin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" text,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: what is the average when the place is 16?" }, { "role": "assistant", "content": "SELECT \"average\" FROM \"average_score_chart\" WHERE \"place\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" text,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: How many times is the rank by average 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"place\") FROM \"average_score_chart\" WHERE \"rank_by_average\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29584601_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many different season numbers does the episode \"The Nineteenth Hole\" have?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_in_season\") FROM \"table1_29584601_1\" WHERE \"title\"='\\\"The Nineteenth Hole\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29584601_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many different pairs of writers wrote the episode with series number 56?" }, { "role": "assistant", "content": "SELECT COUNT(\"written_by\") FROM \"table1_29584601_1\" WHERE \"no_in_series\"=56;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"number\" real,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown\" text,\n \"last_school_college\" text\n);\n\nQuestion: what is the school for chris mcnamara?" }, { "role": "assistant", "content": "SELECT \"last_school_college\" FROM \"roster\" WHERE \"name\"='Chris McNamara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"number\" real,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown\" text,\n \"last_school_college\" text\n);\n\nQuestion: how many hometowns for faisal aden?" }, { "role": "assistant", "content": "SELECT COUNT(\"hometown\") FROM \"roster\" WHERE \"name\"='Faisal Aden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"number\" real,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown\" text,\n \"last_school_college\" text\n);\n\nQuestion: what year is chris mcnamara?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"roster\" WHERE \"name\"='Chris McNamara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"number\" real,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown\" text,\n \"last_school_college\" text\n);\n\nQuestion: what is the height of columbia river hs?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"roster\" WHERE \"last_school_college\"='Columbia River HS';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"number\" real,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"hometown\" text,\n \"last_school_college\" text\n);\n\nQuestion: what is the hometown for mike ladd?" }, { "role": "assistant", "content": "SELECT \"hometown\" FROM \"roster\" WHERE \"name\"='Mike Ladd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"home_teams\" (\n \"season\" real,\n \"apocalypstix\" text,\n \"denim_demons\" text,\n \"sake_tuyas\" text,\n \"toxic_shocks\" text\n);\n\nQuestion: How many seasons did Apocalypstix place 2nd?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"home_teams\" WHERE \"apocalypstix\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"home_teams\" (\n \"season\" real,\n \"apocalypstix\" text,\n \"denim_demons\" text,\n \"sake_tuyas\" text,\n \"toxic_shocks\" text\n);\n\nQuestion: What season did the Sake Tuyas come in 1st place?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"home_teams\" WHERE \"sake_tuyas\"='1st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"home_teams\" (\n \"season\" real,\n \"apocalypstix\" text,\n \"denim_demons\" text,\n \"sake_tuyas\" text,\n \"toxic_shocks\" text\n);\n\nQuestion: What is the most recent season where the Denim Demons placed 3rd?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"home_teams\" WHERE \"denim_demons\"='3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"home_teams\" (\n \"season\" real,\n \"apocalypstix\" text,\n \"denim_demons\" text,\n \"sake_tuyas\" text,\n \"toxic_shocks\" text\n);\n\nQuestion: What place did the Sake Tuyas come in when the Denim Demons were 4th?" }, { "role": "assistant", "content": "SELECT \"sake_tuyas\" FROM \"home_teams\" WHERE \"denim_demons\"='4th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"home_teams\" (\n \"season\" real,\n \"apocalypstix\" text,\n \"denim_demons\" text,\n \"sake_tuyas\" text,\n \"toxic_shocks\" text\n);\n\nQuestion: List all the places that the Apocalypstix occupied when the Denim Demons were 2nd." }, { "role": "assistant", "content": "SELECT \"apocalypstix\" FROM \"home_teams\" WHERE \"denim_demons\"='2nd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29626583_3\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Which team has a midfielder of konrad warzycha?" }, { "role": "assistant", "content": "SELECT \"mls_team\" FROM \"table1_29626583_3\" WHERE \"position\"='Midfielder' AND \"player\"='Konrad Warzycha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29626583_3\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What is the pick number for the team toronto fc and affiliation is ldu quito?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"table1_29626583_3\" WHERE \"mls_team\"='Toronto FC' AND \"affiliation\"='LDU Quito';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29626583_3\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Which MLS team picked player Jason Herrick?" }, { "role": "assistant", "content": "SELECT \"mls_team\" FROM \"table1_29626583_3\" WHERE \"player\"='Jason Herrick';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29626583_3\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What position did the team new york red bulls pick?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"table1_29626583_3\" WHERE \"mls_team\"='New York Red Bulls';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29626583_3\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: What was the position when the affiliation is ldu quito?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"table1_29626583_3\" WHERE \"affiliation\"='LDU Quito';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_serial_dramas_of_2011\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: how many peaks where for the chinese episode named \u842c\u51f0\u4e4b\u738b" }, { "role": "assistant", "content": "SELECT COUNT(\"peak\") FROM \"highest_rating_serial_dramas_of_2011\" WHERE \"chinese_title\"='\u842c\u51f0\u4e4b\u738b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_serial_dramas_of_2011\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: what is the number of the average of the drama titled \u9b5a\u8e8d\u5728\u82b1\u898b" }, { "role": "assistant", "content": "SELECT MAX(\"average\") FROM \"highest_rating_serial_dramas_of_2011\" WHERE \"chinese_title\"='\u9b5a\u8e8d\u5728\u82b1\u898b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_serial_dramas_of_2011\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: how many milion of viewers where in the episode called in english \"is a great way to care\"" }, { "role": "assistant", "content": "SELECT \"hk_viewers\" FROM \"highest_rating_serial_dramas_of_2011\" WHERE \"english_title\"='A Great Way to Care';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_serial_dramas_of_2011\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: what is the number of the premiere for the 34 peak" }, { "role": "assistant", "content": "SELECT \"premiere\" FROM \"highest_rating_serial_dramas_of_2011\" WHERE \"peak\"=34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29679510_2\" (\n \"week\" real,\n \"date\" text,\n \"kickoff\" text,\n \"opponent\" text,\n \"final_score\" text,\n \"team_record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: In what week was the first game played?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"table1_29679510_2\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29635868_1\" (\n \"episode_number\" real,\n \"title_link_to_episode_on_you_tube\" text,\n \"origin\" text,\n \"object_date\" text,\n \"description\" text,\n \"te_papas_collections_online_link\" text,\n \"host_additional_contributors\" text\n);\n\nQuestion: How many object dates have origin in Samoa?" }, { "role": "assistant", "content": "SELECT COUNT(\"object_date\") FROM \"table1_29635868_1\" WHERE \"origin\"='Samoa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29635868_1\" (\n \"episode_number\" real,\n \"title_link_to_episode_on_you_tube\" text,\n \"origin\" text,\n \"object_date\" text,\n \"description\" text,\n \"te_papas_collections_online_link\" text,\n \"host_additional_contributors\" text\n);\n\nQuestion: How many origins have titles of Samoan cricket bats?" }, { "role": "assistant", "content": "SELECT COUNT(\"origin\") FROM \"table1_29635868_1\" WHERE \"title_link_to_episode_on_you_tube\"='Samoan Cricket Bats';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29635868_1\" (\n \"episode_number\" real,\n \"title_link_to_episode_on_you_tube\" text,\n \"origin\" text,\n \"object_date\" text,\n \"description\" text,\n \"te_papas_collections_online_link\" text,\n \"host_additional_contributors\" text\n);\n\nQuestion: How many object dates does episode #16 have?" }, { "role": "assistant", "content": "SELECT COUNT(\"object_date\") FROM \"table1_29635868_1\" WHERE \"episode_number\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film_festivals\" (\n \"film_festival\" text,\n \"date_of_ceremony\" text,\n \"category\" text,\n \"participants_recipients\" text,\n \"result\" text\n);\n\nQuestion: Which films participated in the 61st Berlin international film festival?" }, { "role": "assistant", "content": "SELECT \"participants_recipients\" FROM \"film_festivals\" WHERE \"film_festival\"='61st Berlin International Film Festival';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film_festivals\" (\n \"film_festival\" text,\n \"date_of_ceremony\" text,\n \"category\" text,\n \"participants_recipients\" text,\n \"result\" text\n);\n\nQuestion: What was the result when competing in the Opening NIght Film category?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"film_festivals\" WHERE \"category\"='Opening Night Film';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film_festivals\" (\n \"film_festival\" text,\n \"date_of_ceremony\" text,\n \"category\" text,\n \"participants_recipients\" text,\n \"result\" text\n);\n\nQuestion: Which films participated in the 30th Hawaii International Film Festival?" }, { "role": "assistant", "content": "SELECT \"participants_recipients\" FROM \"film_festivals\" WHERE \"film_festival\"='30th Hawaii International Film Festival';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"film_festivals\" (\n \"film_festival\" text,\n \"date_of_ceremony\" text,\n \"category\" text,\n \"participants_recipients\" text,\n \"result\" text\n);\n\nQuestion: Which films participated when the category was Best Newcomer?" }, { "role": "assistant", "content": "SELECT \"participants_recipients\" FROM \"film_festivals\" WHERE \"category\"='Best Newcomer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text,\n \"movements\" text\n);\n\nQuestion: in which year the season was in 5th position" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"season_to_season\" WHERE \"position\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text,\n \"movements\" text\n);\n\nQuestion: what is the name of the movement in the 7th position" }, { "role": "assistant", "content": "SELECT \"movements\" FROM \"season_to_season\" WHERE \"position\"='7th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text,\n \"movements\" text\n);\n\nQuestion: what is the name of the level for the 7th position" }, { "role": "assistant", "content": "SELECT \"level\" FROM \"season_to_season\" WHERE \"position\"='7th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text,\n \"movements\" text\n);\n\nQuestion: how many sections are for the season of 2008" }, { "role": "assistant", "content": "SELECT COUNT(\"section\") FROM \"season_to_season\" WHERE \"season\"='2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text,\n \"movements\" text\n);\n\nQuestion: in what year the position was the 9th" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"season_to_season\" WHERE \"position\"='9th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: Who was eliminated a person at 18:48?" }, { "role": "assistant", "content": "SELECT \"eliminated_by\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"time\"='18:48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: How many entries are shown for entered at 21:09?" }, { "role": "assistant", "content": "SELECT COUNT(\"entered\") FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"time\"='21:09';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: Who was eliminated by being pinned after a spear at 22:50?" }, { "role": "assistant", "content": "SELECT \"wrestler\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"method_of_elimination\"='Pinned after a spear' AND \"time\"='22:50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elimination_chamber_entrances_and_elimin\" (\n \"eliminated\" real,\n \"wrestler\" text,\n \"entered\" real,\n \"eliminated_by\" text,\n \"method_of_elimination\" text,\n \"time\" text\n);\n\nQuestion: What number was the person eliminated at 22:50?" }, { "role": "assistant", "content": "SELECT \"eliminated\" FROM \"elimination_chamber_entrances_and_elimin\" WHERE \"time\"='22:50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"round\" real,\n \"country\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_rider\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: what is the circuit where the fastest lap is sam lowes and the winning rider is luca scassa?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"season_calendar\" WHERE \"fastest_lap\"='Sam Lowes' AND \"winning_rider\"='Luca Scassa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"round\" real,\n \"country\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_rider\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: what is the round wher the fabien foret had the fastest lap and david salom was the pole position?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"season_calendar\" WHERE \"fastest_lap\"='Fabien Foret' AND \"pole_position\"='David Salom';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"round\" real,\n \"country\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_rider\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: who had the fastest lap for round 1?" }, { "role": "assistant", "content": "SELECT \"fastest_lap\" FROM \"season_calendar\" WHERE \"round\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"round\" real,\n \"country\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_rider\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: what is the pole position for france?" }, { "role": "assistant", "content": "SELECT \"pole_position\" FROM \"season_calendar\" WHERE \"country\"='France';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"round\" real,\n \"country\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_rider\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: what is the maximum round and fabien foret had the pole position?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"season_calendar\" WHERE \"pole_position\"='Fabien Foret';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_crowd_sizes\" (\n \"season\" text,\n \"ave_attendance\" real,\n \"ave_on_prev_season\" text,\n \"competition\" text,\n \"occupier\" text\n);\n\nQuestion: How many values of attendance occur when ave. on previous season is +645?" }, { "role": "assistant", "content": "SELECT COUNT(\"ave_attendance\") FROM \"average_crowd_sizes\" WHERE \"ave_on_prev_season\"='+645';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_crowd_sizes\" (\n \"season\" text,\n \"ave_attendance\" real,\n \"ave_on_prev_season\" text,\n \"competition\" text,\n \"occupier\" text\n);\n\nQuestion: What is the lowest value of average attendance when average on previous season is -459?" }, { "role": "assistant", "content": "SELECT MIN(\"ave_attendance\") FROM \"average_crowd_sizes\" WHERE \"ave_on_prev_season\"='-459';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_crowd_sizes\" (\n \"season\" text,\n \"ave_attendance\" real,\n \"ave_on_prev_season\" text,\n \"competition\" text,\n \"occupier\" text\n);\n\nQuestion: What is the least value for average attendance when average on previous season is +644?" }, { "role": "assistant", "content": "SELECT MIN(\"ave_attendance\") FROM \"average_crowd_sizes\" WHERE \"ave_on_prev_season\"='+644';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"average_crowd_sizes\" (\n \"season\" text,\n \"ave_attendance\" real,\n \"ave_on_prev_season\" text,\n \"competition\" text,\n \"occupier\" text\n);\n\nQuestion: What is every value for average on previous season if the competition is league two?" }, { "role": "assistant", "content": "SELECT \"ave_on_prev_season\" FROM \"average_crowd_sizes\" WHERE \"competition\"='League Two';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"locale\" text,\n \"skip\" text,\n \"w\" real,\n \"l\" real,\n \"pf\" real,\n \"pa\" real,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the least w?" }, { "role": "assistant", "content": "SELECT MIN(\"w\") FROM \"standings\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"locale\" text,\n \"skip\" text,\n \"w\" real,\n \"l\" real,\n \"pf\" real,\n \"pa\" real,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the most stolen ends?" }, { "role": "assistant", "content": "SELECT MAX(\"stolen_ends\") FROM \"standings\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall_scorers\" (\n \"name\" text,\n \"nationality\" text,\n \"malm_ff_career\" text,\n \"league_appearances\" real,\n \"league_goals\" real,\n \"total_appearances\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the total appearances when the total goals is 289?" }, { "role": "assistant", "content": "SELECT MIN(\"total_appearances\") FROM \"overall_scorers\" WHERE \"total_goals\"=289;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall_scorers\" (\n \"name\" text,\n \"nationality\" text,\n \"malm_ff_career\" text,\n \"league_appearances\" real,\n \"league_goals\" real,\n \"total_appearances\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the league goals when the total goals is 179?" }, { "role": "assistant", "content": "SELECT MAX(\"league_goals\") FROM \"overall_scorers\" WHERE \"total_goals\"=179;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overall_scorers\" (\n \"name\" text,\n \"nationality\" text,\n \"malm_ff_career\" text,\n \"league_appearances\" real,\n \"league_goals\" real,\n \"total_appearances\" real,\n \"total_goals\" real\n);\n\nQuestion: How many total appearances are there when the league appearances is 192?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_appearances\") FROM \"overall_scorers\" WHERE \"league_appearances\"=192;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youth_competitions\" (\n \"date\" text,\n \"competition\" text,\n \"location\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text\n);\n\nQuestion: Who were the away teams when the competition was the 1st ``republic of srpska football day`` and the home team was u 14 republic of srpska?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"youth_competitions\" WHERE \"competition\"='1st ``Republic of Srpska Football Day``' AND \"home_team\"='U 14 Republic of Srpska';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"youth_competitions\" (\n \"date\" text,\n \"competition\" text,\n \"location\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text\n);\n\nQuestion: What were the competitions when the away team was fk kozara gradiska?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"youth_competitions\" WHERE \"away_team\"='FK Kozara Gradiska';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"outfield_players\" (\n \"name\" text,\n \"position\" text,\n \"country\" text,\n \"years\" text,\n \"games\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real,\n \"int_caps\" real,\n \"int_goals\" real\n);\n\nQuestion: What are the names of players from the dr congo?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"outfield_players\" WHERE \"country\"='DR Congo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"outfield_players\" (\n \"name\" text,\n \"position\" text,\n \"country\" text,\n \"years\" text,\n \"games\" real,\n \"minutes\" real,\n \"goals\" real,\n \"assists\" real,\n \"int_caps\" real,\n \"int_goals\" real\n);\n\nQuestion: How many is the high assist total for players from panama?" }, { "role": "assistant", "content": "SELECT MAX(\"assists\") FROM \"outfield_players\" WHERE \"country\"='Panama';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_in_the_past\" (\n \"date\" real,\n \"competition\" text,\n \"location\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text\n);\n\nQuestion: What was the result of the home match against FK Rudar Ugljevik?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"results_in_the_past\" WHERE \"away_team\"='FK Rudar Ugljevik';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_in_the_past\" (\n \"date\" real,\n \"competition\" text,\n \"location\" text,\n \"home_team\" text,\n \"result\" text,\n \"away_team\" text\n);\n\nQuestion: Where was the home match against FK Rudar Ugljevik played?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"results_in_the_past\" WHERE \"away_team\"='FK Rudar Ugljevik';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29728787_1\" (\n \"year\" text,\n \"conductor\" text,\n \"opera_house_or_orchestra\" text,\n \"label\" text,\n \"countess\" text,\n \"count\" text,\n \"flamand\" text,\n \"olivier\" text,\n \"la_roche\" text,\n \"clairon\" text\n);\n\nQuestion: When 1971 is the year what is the la roche?" }, { "role": "assistant", "content": "SELECT \"la_roche\" FROM \"table1_29728787_1\" WHERE \"year\"='1971';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29728787_1\" (\n \"year\" text,\n \"conductor\" text,\n \"opera_house_or_orchestra\" text,\n \"label\" text,\n \"countess\" text,\n \"count\" text,\n \"flamand\" text,\n \"olivier\" text,\n \"la_roche\" text,\n \"clairon\" text\n);\n\nQuestion: When deutsche grammophon is the label how many clairons are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"clairon\") FROM \"table1_29728787_1\" WHERE \"label\"='Deutsche Grammophon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29728787_1\" (\n \"year\" text,\n \"conductor\" text,\n \"opera_house_or_orchestra\" text,\n \"label\" text,\n \"countess\" text,\n \"count\" text,\n \"flamand\" text,\n \"olivier\" text,\n \"la_roche\" text,\n \"clairon\" text\n);\n\nQuestion: When hermann uhde is the count who is the conductor?" }, { "role": "assistant", "content": "SELECT \"conductor\" FROM \"table1_29728787_1\" WHERE \"count\"='Hermann Uhde';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29728787_1\" (\n \"year\" text,\n \"conductor\" text,\n \"opera_house_or_orchestra\" text,\n \"label\" text,\n \"countess\" text,\n \"count\" text,\n \"flamand\" text,\n \"olivier\" text,\n \"la_roche\" text,\n \"clairon\" text\n);\n\nQuestion: When dietrich fischer-dieskau is the olivier who is the conductor?" }, { "role": "assistant", "content": "SELECT \"conductor\" FROM \"table1_29728787_1\" WHERE \"olivier\"='Dietrich Fischer-Dieskau';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29728787_1\" (\n \"year\" text,\n \"conductor\" text,\n \"opera_house_or_orchestra\" text,\n \"label\" text,\n \"countess\" text,\n \"count\" text,\n \"flamand\" text,\n \"olivier\" text,\n \"la_roche\" text,\n \"clairon\" text\n);\n\nQuestion: When karl ridderbusch is the la roche who is the olivier?" }, { "role": "assistant", "content": "SELECT \"olivier\" FROM \"table1_29728787_1\" WHERE \"la_roche\"='Karl Ridderbusch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"class_16_da_4_6_2_builders_works_numbers\" (\n \"sar_no\" real,\n \"builder\" text,\n \"year\" real,\n \"works_no\" real,\n \"firebox\" text,\n \"driver_diameter\" text\n);\n\nQuestion: What are the works numbers where the year is 1929 and the driver diameter is 60\"/1520mm? " }, { "role": "assistant", "content": "SELECT \"works_no\" FROM \"class_16_da_4_6_2_builders_works_numbers\" WHERE \"year\"=1929 AND \"driver_diameter\"='60\\\"/1520mm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"class_16_da_4_6_2_builders_works_numbers\" (\n \"sar_no\" real,\n \"builder\" text,\n \"year\" real,\n \"works_no\" real,\n \"firebox\" text,\n \"driver_diameter\" text\n);\n\nQuestion: For what year is the SAR no. 874?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"class_16_da_4_6_2_builders_works_numbers\" WHERE \"sar_no\"=874;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29747178_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who is the writer when the director is bob berlinger?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_29747178_2\" WHERE \"directed_by\"='Bob Berlinger';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29747178_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many millions of U.S viewers are there when the director is andy wolk?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_29747178_2\" WHERE \"directed_by\"='Andy Wolk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29747178_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the series # when the director is john showalter?" }, { "role": "assistant", "content": "SELECT \"series_num\" FROM \"table1_29747178_2\" WHERE \"directed_by\"='John Showalter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29747178_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who is the director when the title is \"believers\"?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_29747178_2\" WHERE \"title\"='\\\"Believers\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_29747178_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the title when the series # is 7?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_29747178_2\" WHERE \"series_num\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" real,\n \"date\" text,\n \"official_rating_4\" text,\n \"share_4\" text,\n \"official_rating_16_39\" text,\n \"share_16_39\" text\n);\n\nQuestion: Which episode had a share 16-19 of 23,22%?" }, { "role": "assistant", "content": "SELECT MAX(\"episode\") FROM \"rating_figures\" WHERE \"share_16_39\"='23,22%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rating_figures\" (\n \"episode\" real,\n \"date\" text,\n \"official_rating_4\" text,\n \"share_4\" text,\n \"official_rating_16_39\" text,\n \"share_16_39\" text\n);\n\nQuestion: What was the official rating 16-39 of episode 9?" }, { "role": "assistant", "content": "SELECT \"official_rating_16_39\" FROM \"rating_figures\" WHERE \"episode\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"manufacturer\" text,\n \"model\" text,\n \"intro_date\" text,\n \"interface\" text,\n \"os\" text,\n \"price_usd\" real,\n \"price\" text,\n \"throughput\" text\n);\n\nQuestion: What is the intro date for the interface that equals pci?" }, { "role": "assistant", "content": "SELECT \"intro_date\" FROM \"references\" WHERE \"interface\"='PCI';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"manufacturer\" text,\n \"model\" text,\n \"intro_date\" text,\n \"interface\" text,\n \"os\" text,\n \"price_usd\" real,\n \"price\" text,\n \"throughput\" text\n);\n\nQuestion: What is the intro date for the throughput of 16 mbit/s?" }, { "role": "assistant", "content": "SELECT \"intro_date\" FROM \"references\" WHERE \"throughput\"='16 Mbit/s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"manufacturer\" text,\n \"model\" text,\n \"intro_date\" text,\n \"interface\" text,\n \"os\" text,\n \"price_usd\" real,\n \"price\" text,\n \"throughput\" text\n);\n\nQuestion: How many intro dates have the price of 686\u20ac?" }, { "role": "assistant", "content": "SELECT COUNT(\"intro_date\") FROM \"references\" WHERE \"price\"='686\u20ac';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"manufacturer\" text,\n \"model\" text,\n \"intro_date\" text,\n \"interface\" text,\n \"os\" text,\n \"price_usd\" real,\n \"price\" text,\n \"throughput\" text\n);\n\nQuestion: What is the price for the manufacturer LETech?" }, { "role": "assistant", "content": "SELECT \"price\" FROM \"references\" WHERE \"manufacturer\"='LETech';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"manufacturer\" text,\n \"model\" text,\n \"intro_date\" text,\n \"interface\" text,\n \"os\" text,\n \"price_usd\" real,\n \"price\" text,\n \"throughput\" text\n);\n\nQuestion: What is the price (usd) for the model pq32mu?" }, { "role": "assistant", "content": "SELECT MIN(\"price_usd\") FROM \"references\" WHERE \"model\"='PQ32MU';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"manufacturer\" text,\n \"model\" text,\n \"intro_date\" text,\n \"interface\" text,\n \"os\" text,\n \"price_usd\" real,\n \"price\" text,\n \"throughput\" text\n);\n\nQuestion: Who is the manufacturer whose intro date is 2006 and their throughput is 4 mbit/s?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"references\" WHERE \"intro_date\"='2006' AND \"throughput\"='4 Mbit/s';" } ]