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 \"official_callanetics_videos\" (\n \"year\" real,\n \"title\" text,\n \"format\" text,\n \"studio\" text,\n \"release_date\" text,\n \"copyright_information\" text,\n \"catalog_number\" text\n);\n\nQuestion: The Catalog number is 80809 what is the title?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"official_callanetics_videos\" WHERE \"catalog_number\"='80809';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_callanetics_videos\" (\n \"year\" real,\n \"title\" text,\n \"format\" text,\n \"studio\" text,\n \"release_date\" text,\n \"copyright_information\" text,\n \"catalog_number\" text\n);\n\nQuestion: where title is beginning callanetics , what is the total of format ?" }, { "role": "assistant", "content": "SELECT COUNT(\"format\") FROM \"official_callanetics_videos\" WHERE \"title\"='Beginning Callanetics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_callanetics_videos\" (\n \"year\" real,\n \"title\" text,\n \"format\" text,\n \"studio\" text,\n \"release_date\" text,\n \"copyright_information\" text,\n \"catalog_number\" text\n);\n\nQuestion: where catalog number is 81258 , what are all the studio ?" }, { "role": "assistant", "content": "SELECT \"studio\" FROM \"official_callanetics_videos\" WHERE \"catalog_number\"='81258';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_callanetics_videos\" (\n \"year\" real,\n \"title\" text,\n \"format\" text,\n \"studio\" text,\n \"release_date\" text,\n \"copyright_information\" text,\n \"catalog_number\" text\n);\n\nQuestion: where title is am/pm callanetics , what are all the copyright information?" }, { "role": "assistant", "content": "SELECT \"copyright_information\" FROM \"official_callanetics_videos\" WHERE \"title\"='AM/PM Callanetics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1908_1994_new_south_wales_rugby_league\" (\n \"season\" real,\n \"grand_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"gf_attendance\" real,\n \"clive_churchill_medal\" text\n);\n\nQuestion: What was the GF attendance at the location of Sydney Football Stadium, Sydney (6)?" }, { "role": "assistant", "content": "SELECT COUNT(\"gf_attendance\") FROM \"1908_1994_new_south_wales_rugby_league\" WHERE \"location\"='Sydney Football Stadium, Sydney (6)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1908_1994_new_south_wales_rugby_league\" (\n \"season\" real,\n \"grand_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"gf_attendance\" real,\n \"clive_churchill_medal\" text\n);\n\nQuestion: Which losing team had a score of 24-12?" }, { "role": "assistant", "content": "SELECT \"losing_team\" FROM \"1908_1994_new_south_wales_rugby_league\" WHERE \"score\"='24-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1908_1994_new_south_wales_rugby_league\" (\n \"season\" real,\n \"grand_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"gf_attendance\" real,\n \"clive_churchill_medal\" text\n);\n\nQuestion: What was the losing team in the 1993 season?" }, { "role": "assistant", "content": "SELECT \"losing_team\" FROM \"1908_1994_new_south_wales_rugby_league\" WHERE \"season\"=1993;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specifications_for_different_r_985_wasp_\" (\n \"engine\" text,\n \"power_continuous\" text,\n \"critical_altitude_this_is_the_highest_altitude_at_which_the_engine_can_achieve_its_full_continuous_power_rating_above_this_altitude_power_falls_off_with_height_as_with_a_naturally_aspirated_engine_see_superchargernum_altitude_effects_for_details\" text,\n \"power_takeoff\" text,\n \"compression_ratio\" text,\n \"supercharger_gear_ratio\" text,\n \"octane_rating\" text,\n \"dry_weight\" text\n);\n\nQuestion: What was the compression ration when the engine was Wasp Jr. T1B2?" }, { "role": "assistant", "content": "SELECT \"compression_ratio\" FROM \"specifications_for_different_r_985_wasp_\" WHERE \"engine\"='Wasp Jr. T1B2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specifications_for_different_r_985_wasp_\" (\n \"engine\" text,\n \"power_continuous\" text,\n \"critical_altitude_this_is_the_highest_altitude_at_which_the_engine_can_achieve_its_full_continuous_power_rating_above_this_altitude_power_falls_off_with_height_as_with_a_naturally_aspirated_engine_see_superchargernum_altitude_effects_for_details\" text,\n \"power_takeoff\" text,\n \"compression_ratio\" text,\n \"supercharger_gear_ratio\" text,\n \"octane_rating\" text,\n \"dry_weight\" text\n);\n\nQuestion: What is the compression ration when the continuous power is hp (kw) at 2,200 RPM and the octane rating is 80/87?" }, { "role": "assistant", "content": "SELECT \"compression_ratio\" FROM \"specifications_for_different_r_985_wasp_\" WHERE \"power_continuous\"='hp (kW) at 2,200 RPM' AND \"octane_rating\"='80/87';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specifications_for_different_r_985_wasp_\" (\n \"engine\" text,\n \"power_continuous\" text,\n \"critical_altitude_this_is_the_highest_altitude_at_which_the_engine_can_achieve_its_full_continuous_power_rating_above_this_altitude_power_falls_off_with_height_as_with_a_naturally_aspirated_engine_see_superchargernum_altitude_effects_for_details\" text,\n \"power_takeoff\" text,\n \"compression_ratio\" text,\n \"supercharger_gear_ratio\" text,\n \"octane_rating\" text,\n \"dry_weight\" text\n);\n\nQuestion: What is the compression ratio when the continuous power is hp (KW) at 2,200 RPM and the critical altitude is at sea level?" }, { "role": "assistant", "content": "SELECT COUNT(\"compression_ratio\") FROM \"specifications_for_different_r_985_wasp_\" WHERE \"power_continuous\"='hp (kW) at 2,200 RPM' AND \"critical_altitude_this_is_the_highest_altitude_at_which_the_engine_can_achieve_its_full_continuous_power_rating_above_this_altitude_power_falls_off_with_height_as_with_a_naturally_aspirated_engine_see_superchargernum_altitude_effects_for_details\"='sea level';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specifications_for_different_r_985_wasp_\" (\n \"engine\" text,\n \"power_continuous\" text,\n \"critical_altitude_this_is_the_highest_altitude_at_which_the_engine_can_achieve_its_full_continuous_power_rating_above_this_altitude_power_falls_off_with_height_as_with_a_naturally_aspirated_engine_see_superchargernum_altitude_effects_for_details\" text,\n \"power_takeoff\" text,\n \"compression_ratio\" text,\n \"supercharger_gear_ratio\" text,\n \"octane_rating\" text,\n \"dry_weight\" text\n);\n\nQuestion: When the engine is Wasp Jr. T1B2, what is the number needed for takeoff power?" }, { "role": "assistant", "content": "SELECT COUNT(\"power_takeoff\") FROM \"specifications_for_different_r_985_wasp_\" WHERE \"engine\"='Wasp Jr. T1B2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specifications_for_different_r_985_wasp_\" (\n \"engine\" text,\n \"power_continuous\" text,\n \"critical_altitude_this_is_the_highest_altitude_at_which_the_engine_can_achieve_its_full_continuous_power_rating_above_this_altitude_power_falls_off_with_height_as_with_a_naturally_aspirated_engine_see_superchargernum_altitude_effects_for_details\" text,\n \"power_takeoff\" text,\n \"compression_ratio\" text,\n \"supercharger_gear_ratio\" text,\n \"octane_rating\" text,\n \"dry_weight\" text\n);\n\nQuestion: When critical altitude is sea level, what is the compression ration for a supercharger gear ratio of 7:1?" }, { "role": "assistant", "content": "SELECT \"compression_ratio\" FROM \"specifications_for_different_r_985_wasp_\" WHERE \"critical_altitude_this_is_the_highest_altitude_at_which_the_engine_can_achieve_its_full_continuous_power_rating_above_this_altitude_power_falls_off_with_height_as_with_a_naturally_aspirated_engine_see_superchargernum_altitude_effects_for_details\"='sea level' AND \"supercharger_gear_ratio\"='7:1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"viewers\" text,\n \"weekly_rank_for_living\" text\n);\n\nQuestion: How many episodes aired on october 27, 2008" }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"weekly_ratings\" WHERE \"air_date\"='October 27, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"viewers\" text,\n \"weekly_rank_for_living\" text\n);\n\nQuestion: The episode \"chapter five: dressed to kill\" had a weekly ranking of what?" }, { "role": "assistant", "content": "SELECT \"weekly_rank_for_living\" FROM \"weekly_ratings\" WHERE \"episode\"='\\\"Chapter Five: Dressed to Kill\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"viewers\" text,\n \"weekly_rank_for_living\" text\n);\n\nQuestion: what is the most # that aired on september 29, 2008?" }, { "role": "assistant", "content": "SELECT MAX(\"num\") FROM \"weekly_ratings\" WHERE \"air_date\"='September 29, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_present_national_rugby_league\" (\n \"season\" real,\n \"grand_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"gf_attendance\" real,\n \"clive_churchill_medal\" text\n);\n\nQuestion: How many seasons did the canterbury bulldogs (8) win?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"1998_present_national_rugby_league\" WHERE \"winning_team\"='Canterbury Bulldogs (8)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_present_national_rugby_league\" (\n \"season\" real,\n \"grand_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"gf_attendance\" real,\n \"clive_churchill_medal\" text\n);\n\nQuestion: How many teams lost at the sydney football stadium, sydney (11)?" }, { "role": "assistant", "content": "SELECT COUNT(\"losing_team\") FROM \"1998_present_national_rugby_league\" WHERE \"location\"='Sydney Football Stadium, Sydney (11)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_present_national_rugby_league\" (\n \"season\" real,\n \"grand_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"gf_attendance\" real,\n \"clive_churchill_medal\" text\n);\n\nQuestion: What was the date that the st. george-illawarra dragons lost?" }, { "role": "assistant", "content": "SELECT \"grand_final_date\" FROM \"1998_present_national_rugby_league\" WHERE \"losing_team\"='St. George-Illawarra Dragons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_present_national_rugby_league\" (\n \"season\" real,\n \"grand_final_date\" text,\n \"winning_team\" text,\n \"score\" text,\n \"losing_team\" text,\n \"location\" text,\n \"gf_attendance\" real,\n \"clive_churchill_medal\" text\n);\n\nQuestion: Brett kimmorley, who was chosen for the clive churchill medal belonged to what team?" }, { "role": "assistant", "content": "SELECT \"winning_team\" FROM \"1998_present_national_rugby_league\" WHERE \"clive_churchill_medal\"='Brett Kimmorley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"time_slot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_overall\" text\n);\n\nQuestion: What time slots have a 6.3 rating" }, { "role": "assistant", "content": "SELECT \"time_slot_est\" FROM \"weekly_ratings\" WHERE \"rating\"='6.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"time_slot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_overall\" text\n);\n\nQuestion: What time slot is the episode \"the way we weren't\" in" }, { "role": "assistant", "content": "SELECT \"time_slot_est\" FROM \"weekly_ratings\" WHERE \"episode\"='\\\"The Way We Weren''t\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"time_slot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_overall\" text\n);\n\nQuestion: What time slot is the episode \"who's your daddy\" in" }, { "role": "assistant", "content": "SELECT \"time_slot_est\" FROM \"weekly_ratings\" WHERE \"episode\"='\\\"Who''s Your Daddy\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"time_slot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_overall\" text\n);\n\nQuestion: Which air date had an 11 share" }, { "role": "assistant", "content": "SELECT \"air_date\" FROM \"weekly_ratings\" WHERE \"share\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"time_slot_est\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_overall\" text\n);\n\nQuestion: Which air date had the 18-49 rating/share of 3.3/9" }, { "role": "assistant", "content": "SELECT \"air_date\" FROM \"weekly_ratings\" WHERE \"18_49_rating_share\"='3.3/9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11240028_3\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"relationship\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: Which characters had their first experience in the episode \"consequences\"?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"table1_11240028_3\" WHERE \"first_appearance\"='\\\"Consequences\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11240028_3\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"relationship\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: What episode had the last appearances of the late wife of mac taylor?" }, { "role": "assistant", "content": "SELECT \"last_appearance\" FROM \"table1_11240028_3\" WHERE \"relationship\"='Late wife of Mac Taylor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11240028_3\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"relationship\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: Which characters were portrayed by reed garrett?" }, { "role": "assistant", "content": "SELECT \"portrayed_by\" FROM \"table1_11240028_3\" WHERE \"character\"='Reed Garrett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11240028_3\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"relationship\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: How many characters were portrayed by the informant of don flack?" }, { "role": "assistant", "content": "SELECT COUNT(\"portrayed_by\") FROM \"table1_11240028_3\" WHERE \"relationship\"='Informant of Don Flack';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11240028_3\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"relationship\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: What episode was the last appearance of the character, rikki sandoval?" }, { "role": "assistant", "content": "SELECT \"last_appearance\" FROM \"table1_11240028_3\" WHERE \"character\"='Rikki Sandoval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_characters\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"first_appearance\" text,\n \"last_appearance\" text,\n \"duration\" text,\n \"episodes\" text\n);\n\nQuestion: On which episode did actress Sela Ward make her last appearance?" }, { "role": "assistant", "content": "SELECT \"last_appearance\" FROM \"main_characters\" WHERE \"portrayed_by\"='Sela Ward';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_characters\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"first_appearance\" text,\n \"last_appearance\" text,\n \"duration\" text,\n \"episodes\" text\n);\n\nQuestion: Which actors first appeared in \"Zoo York\"?" }, { "role": "assistant", "content": "SELECT \"portrayed_by\" FROM \"main_characters\" WHERE \"first_appearance\"='\\\"Zoo York\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_characters\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"first_appearance\" text,\n \"last_appearance\" text,\n \"duration\" text,\n \"episodes\" text\n);\n\nQuestion: How many episodes did actress Vanessa Ferlito appear in?" }, { "role": "assistant", "content": "SELECT \"episodes\" FROM \"main_characters\" WHERE \"portrayed_by\"='Vanessa Ferlito';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_characters\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"first_appearance\" text,\n \"last_appearance\" text,\n \"duration\" text,\n \"episodes\" text\n);\n\nQuestion: Which actors first appeared in episode \"Blink\" 1, 2, 3?" }, { "role": "assistant", "content": "SELECT \"portrayed_by\" FROM \"main_characters\" WHERE \"first_appearance\"='\\\"Blink\\\" 1, 2, 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_characters\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"first_appearance\" text,\n \"last_appearance\" text,\n \"duration\" text,\n \"episodes\" text\n);\n\nQuestion: What was the duration of Robert Joy's portrayal?" }, { "role": "assistant", "content": "SELECT COUNT(\"duration\") FROM \"main_characters\" WHERE \"portrayed_by\"='Robert Joy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_characters\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"first_appearance\" text,\n \"last_appearance\" text,\n \"duration\" text,\n \"episodes\" text\n);\n\nQuestion: Which episode did actor A. J. Buckley last appear in?" }, { "role": "assistant", "content": "SELECT \"last_appearance\" FROM \"main_characters\" WHERE \"portrayed_by\"='A. J. Buckley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"position_in_2012_13\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"number_of_seasons_in_the_premier_league\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: What is the least top division titles?" }, { "role": "assistant", "content": "SELECT MIN(\"top_division_titles\") FROM \"clubs\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"position_in_2012_13\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"number_of_seasons_in_the_premier_league\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: What is the least number of seasons in top division?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_seasons_in_top_division\") FROM \"clubs\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_week\" text\n);\n\nQuestion: How many viewers (millions) were there for rank (week) 20?" }, { "role": "assistant", "content": "SELECT COUNT(\"viewers_millions\") FROM \"u_s_nielsen_ratings\" WHERE \"rank_week\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_week\" text\n);\n\nQuestion: What is the rank (timeslot) with the episode name \"dangerous liaisons\"?" }, { "role": "assistant", "content": "SELECT \"rank_timeslot\" FROM \"u_s_nielsen_ratings\" WHERE \"episode\"='\\\"Dangerous Liaisons\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_week\" text\n);\n\nQuestion: What is the lowest rank (night) for having viewers (millions) 5.25?" }, { "role": "assistant", "content": "SELECT MIN(\"rank_night\") FROM \"u_s_nielsen_ratings\" WHERE \"viewers_millions\"='5.25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_week\" text\n);\n\nQuestion: How many times was the episode named \"conference call\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"num\") FROM \"u_s_nielsen_ratings\" WHERE \"episode\"='\\\"Conference Call\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_week\" text\n);\n\nQuestion: How many times was the rank (night) 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"viewers_millions\") FROM \"u_s_nielsen_ratings\" WHERE \"rank_night\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11251601_2\" (\n \"country\" text,\n \"carbon_dioxide_emissions_per_year_10_6_tons_2006\" real,\n \"percentage_of_global_total\" text,\n \"avg_emission_per_km_2_of_its_land_tons\" real,\n \"carbon_dioxide_emissions_per_year_tons_per_person_2007\" text\n);\n\nQuestion: WHAT WAS THE AMOUNT OF CARBON DIOXIDE EMISSIONS IN 2006 IN THE COUNTRY WHOSE CO2 EMISSIONS (TONS PER PERSON) REACHED 1.4 IN 2OO7?" }, { "role": "assistant", "content": "SELECT \"carbon_dioxide_emissions_per_year_10_6_tons_2006\" FROM \"table1_11251601_2\" WHERE \"carbon_dioxide_emissions_per_year_tons_per_person_2007\"='1.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11251601_2\" (\n \"country\" text,\n \"carbon_dioxide_emissions_per_year_10_6_tons_2006\" real,\n \"percentage_of_global_total\" text,\n \"avg_emission_per_km_2_of_its_land_tons\" real,\n \"carbon_dioxide_emissions_per_year_tons_per_person_2007\" text\n);\n\nQuestion: HOW MANY TONS OF CO2 EMISSIONS DID RUSSIA PRODUCE IN 2006?" }, { "role": "assistant", "content": "SELECT MAX(\"carbon_dioxide_emissions_per_year_10_6_tons_2006\") FROM \"table1_11251601_2\" WHERE \"country\"='Russia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11251601_2\" (\n \"country\" text,\n \"carbon_dioxide_emissions_per_year_10_6_tons_2006\" real,\n \"percentage_of_global_total\" text,\n \"avg_emission_per_km_2_of_its_land_tons\" real,\n \"carbon_dioxide_emissions_per_year_tons_per_person_2007\" text\n);\n\nQuestion: WHAT PERCENTAGE OF GLOBAL TOTAL EMISSIONS DID INDIA PRODUCE?" }, { "role": "assistant", "content": "SELECT \"percentage_of_global_total\" FROM \"table1_11251601_2\" WHERE \"country\"='India';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11251601_2\" (\n \"country\" text,\n \"carbon_dioxide_emissions_per_year_10_6_tons_2006\" real,\n \"percentage_of_global_total\" text,\n \"avg_emission_per_km_2_of_its_land_tons\" real,\n \"carbon_dioxide_emissions_per_year_tons_per_person_2007\" text\n);\n\nQuestion: HOW MUCH IS THE PERCENTAGE OF GLOBAL TOTAL EMISSIONS IN THE COUNTRY THAT PRODUCED 4.9 TONS PER PERSON IN 2007?" }, { "role": "assistant", "content": "SELECT \"percentage_of_global_total\" FROM \"table1_11251601_2\" WHERE \"carbon_dioxide_emissions_per_year_tons_per_person_2007\"='4.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11251601_2\" (\n \"country\" text,\n \"carbon_dioxide_emissions_per_year_10_6_tons_2006\" real,\n \"percentage_of_global_total\" text,\n \"avg_emission_per_km_2_of_its_land_tons\" real,\n \"carbon_dioxide_emissions_per_year_tons_per_person_2007\" text\n);\n\nQuestion: WHAT WAS THE AVERAGE EMISSION PER KM 2 IN INDIA?" }, { "role": "assistant", "content": "SELECT MAX(\"avg_emission_per_km_2_of_its_land_tons\") FROM \"table1_11251601_2\" WHERE \"country\"='India';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"season\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What is the rank number that aired october 26, 2007?" }, { "role": "assistant", "content": "SELECT \"rank_num\" FROM \"weekly_ratings\" WHERE \"air_date\"='October 26, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"season\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What is the number of rank with the viewership of 5.96 million?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank_num\") FROM \"weekly_ratings\" WHERE \"viewers_m\"='5.96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"num\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"season\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What is the viewership on november 9, 2007?" }, { "role": "assistant", "content": "SELECT \"viewers_m\" FROM \"weekly_ratings\" WHERE \"air_date\"='November 9, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ranking_points\" (\n \"finishing_position\" text,\n \"points_awarded_platinum\" real,\n \"points_awarded_gold\" real,\n \"points_awarded_silver\" real,\n \"points_awarded_satellite\" real\n);\n\nQuestion: How many platinum points were awarded when 6 gold points were awarded?" }, { "role": "assistant", "content": "SELECT MAX(\"points_awarded_platinum\") FROM \"ranking_points\" WHERE \"points_awarded_gold\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ranking_points\" (\n \"finishing_position\" text,\n \"points_awarded_platinum\" real,\n \"points_awarded_gold\" real,\n \"points_awarded_silver\" real,\n \"points_awarded_satellite\" real\n);\n\nQuestion: What was the range of finishing position for 15 awarded platinum points?" }, { "role": "assistant", "content": "SELECT \"finishing_position\" FROM \"ranking_points\" WHERE \"points_awarded_platinum\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ranking_points\" (\n \"finishing_position\" text,\n \"points_awarded_platinum\" real,\n \"points_awarded_gold\" real,\n \"points_awarded_silver\" real,\n \"points_awarded_satellite\" real\n);\n\nQuestion: How many platinum points were awarded for 5th place?" }, { "role": "assistant", "content": "SELECT MAX(\"points_awarded_platinum\") FROM \"ranking_points\" WHERE \"finishing_position\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ranking_points\" (\n \"finishing_position\" text,\n \"points_awarded_platinum\" real,\n \"points_awarded_gold\" real,\n \"points_awarded_silver\" real,\n \"points_awarded_satellite\" real\n);\n\nQuestion: How many platinum points were awarded when 70 silver points were awarded?" }, { "role": "assistant", "content": "SELECT \"points_awarded_platinum\" FROM \"ranking_points\" WHERE \"points_awarded_silver\"=70;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ranking_points\" (\n \"finishing_position\" text,\n \"points_awarded_platinum\" real,\n \"points_awarded_gold\" real,\n \"points_awarded_silver\" real,\n \"points_awarded_satellite\" real\n);\n\nQuestion: How many platinum points were awarded when 9 gold points were awarded?" }, { "role": "assistant", "content": "SELECT \"points_awarded_platinum\" FROM \"ranking_points\" WHERE \"points_awarded_gold\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: How did the episode rank that had 2.65 million viewers?" }, { "role": "assistant", "content": "SELECT \"rank_num\" FROM \"season_1\" WHERE \"viewers_m\"='2.65';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What was the share for the first episode that ranked 85?" }, { "role": "assistant", "content": "SELECT MIN(\"share\") FROM \"season_1\" WHERE \"rank_num\"='85';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: Which timeslot did episode no. 15 hold?" }, { "role": "assistant", "content": "SELECT \"timeslot\" FROM \"season_1\" WHERE \"no\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" text,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What was the timeslot for the episode that aired on May 12, 2009?" }, { "role": "assistant", "content": "SELECT \"timeslot\" FROM \"season_2\" WHERE \"air_date\"='May 12, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" text,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What's the 18-49 (rating/share) of the episode that originally aired on May 5, 2009?" }, { "role": "assistant", "content": "SELECT \"18_49_rating_share\" FROM \"season_2\" WHERE \"air_date\"='May 5, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" text,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What's the total number of episodes whose original airings were viewed by 1.82 million viewers?" }, { "role": "assistant", "content": "SELECT COUNT(\"air_date\") FROM \"season_2\" WHERE \"viewers_m\"='1.82';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" text,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What's the rating of the episode originally aired on May 5, 2009?" }, { "role": "assistant", "content": "SELECT \"rating\" FROM \"season_2\" WHERE \"air_date\"='May 5, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"no\" real,\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" text,\n \"share\" text,\n \"18_49_rating_share\" text,\n \"viewers_m\" text,\n \"rank_num\" text\n);\n\nQuestion: What episode was seen by 2.05 million viewers?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"season_2\" WHERE \"viewers_m\"='2.05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11256021_1\" (\n \"date\" text,\n \"founder\" text,\n \"extroversion_scales\" text,\n \"people_task_orientation_scale\" text,\n \"introverted_task_oriented\" text,\n \"extroverted_task_oriented\" text,\n \"extroverted_relationship_oriented\" text,\n \"introverted_relationship_oriented\" text,\n \"moderate\" text\n);\n\nQuestion: what's the\u00a0extroverted, relationship-oriented\u00a0where\u00a0extroverted, task-oriented\u00a0is director" }, { "role": "assistant", "content": "SELECT \"extroverted_relationship_oriented\" FROM \"table1_11256021_1\" WHERE \"extroverted_task_oriented\"='Director';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11256021_1\" (\n \"date\" text,\n \"founder\" text,\n \"extroversion_scales\" text,\n \"people_task_orientation_scale\" text,\n \"introverted_task_oriented\" text,\n \"extroverted_task_oriented\" text,\n \"extroverted_relationship_oriented\" text,\n \"introverted_relationship_oriented\" text,\n \"moderate\" text\n);\n\nQuestion: what's the\u00a0extroverted, relationship-oriented\u00a0where\u00a0moderate\u00a0is introverted sanguine" }, { "role": "assistant", "content": "SELECT \"extroverted_relationship_oriented\" FROM \"table1_11256021_1\" WHERE \"moderate\"='Introverted Sanguine';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11256021_1\" (\n \"date\" text,\n \"founder\" text,\n \"extroversion_scales\" text,\n \"people_task_orientation_scale\" text,\n \"introverted_task_oriented\" text,\n \"extroverted_task_oriented\" text,\n \"extroverted_relationship_oriented\" text,\n \"introverted_relationship_oriented\" text,\n \"moderate\" text\n);\n\nQuestion: what's the\u00a0founder\u00a0where\u00a0moderate\u00a0is ether" }, { "role": "assistant", "content": "SELECT \"founder\" FROM \"table1_11256021_1\" WHERE \"moderate\"='ether';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11256021_1\" (\n \"date\" text,\n \"founder\" text,\n \"extroversion_scales\" text,\n \"people_task_orientation_scale\" text,\n \"introverted_task_oriented\" text,\n \"extroverted_task_oriented\" text,\n \"extroverted_relationship_oriented\" text,\n \"introverted_relationship_oriented\" text,\n \"moderate\" text\n);\n\nQuestion: what's the\u00a0extroverted, relationship-oriented\u00a0where\u00a0date\u00a0is c. 1928" }, { "role": "assistant", "content": "SELECT \"extroverted_relationship_oriented\" FROM \"table1_11256021_1\" WHERE \"date\"='c. 1928';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11256021_1\" (\n \"date\" text,\n \"founder\" text,\n \"extroversion_scales\" text,\n \"people_task_orientation_scale\" text,\n \"introverted_task_oriented\" text,\n \"extroverted_task_oriented\" text,\n \"extroverted_relationship_oriented\" text,\n \"introverted_relationship_oriented\" text,\n \"moderate\" text\n);\n\nQuestion: who is the\u00a0founder\u00a0where\u00a0date\u00a0is c. 1900" }, { "role": "assistant", "content": "SELECT \"founder\" FROM \"table1_11256021_1\" WHERE \"date\"='c. 1900';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11256021_1\" (\n \"date\" text,\n \"founder\" text,\n \"extroversion_scales\" text,\n \"people_task_orientation_scale\" text,\n \"introverted_task_oriented\" text,\n \"extroverted_task_oriented\" text,\n \"extroverted_relationship_oriented\" text,\n \"introverted_relationship_oriented\" text,\n \"moderate\" text\n);\n\nQuestion: what's the\u00a0people-task orientation scale\u00a0where\u00a0extroverted, relationship-oriented\u00a0is team type" }, { "role": "assistant", "content": "SELECT \"people_task_orientation_scale\" FROM \"table1_11256021_1\" WHERE \"extroverted_relationship_oriented\"='Team Type';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11303072_5\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is the batting team where the runs are 276?" }, { "role": "assistant", "content": "SELECT \"batting_team\" FROM \"table1_11303072_5\" WHERE \"runs\"='276';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11303072_5\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Name the batting team at Durham" }, { "role": "assistant", "content": "SELECT \"batting_team\" FROM \"table1_11303072_5\" WHERE \"fielding_team\"='Durham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11303072_5\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is the batting team with the batting partnets of thilina kandamby and rangana herath?" }, { "role": "assistant", "content": "SELECT \"batting_team\" FROM \"table1_11303072_5\" WHERE \"batting_partners\"='Thilina Kandamby and Rangana Herath';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11303072_5\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is the fielding team with 155 runs?" }, { "role": "assistant", "content": "SELECT \"fielding_team\" FROM \"table1_11303072_5\" WHERE \"runs\"='155';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_11303072_5\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What is the batting partners with runs of 226?" }, { "role": "assistant", "content": "SELECT \"batting_partners\" FROM \"table1_11303072_5\" WHERE \"runs\"='226';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_career\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"nationality\" text,\n \"catches\" real,\n \"stumpings\" real,\n \"career_span\" text\n);\n\nQuestion: What is the nationality of David Bairstow?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"most_dismissals_in_a_career\" WHERE \"player\"='David Bairstow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_career\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"nationality\" text,\n \"catches\" real,\n \"stumpings\" real,\n \"career_span\" text\n);\n\nQuestion: What are the players whose rank is 2?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"most_dismissals_in_a_career\" WHERE \"rank\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_career\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"nationality\" text,\n \"catches\" real,\n \"stumpings\" real,\n \"career_span\" text\n);\n\nQuestion: How many stumpings has Paul Nixon in his career?" }, { "role": "assistant", "content": "SELECT \"stumpings\" FROM \"most_dismissals_in_a_career\" WHERE \"player\"='Paul Nixon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_career\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"nationality\" text,\n \"catches\" real,\n \"stumpings\" real,\n \"career_span\" text\n);\n\nQuestion: Where is Adam Gilchrist from?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"most_dismissals_in_a_career\" WHERE \"player\"='Adam Gilchrist';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1130632_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"featured_character_s\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What are the title that have 19.48 million u.s. viewers?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_1130632_1\" WHERE \"u_s_viewers_million\"='19.48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1130632_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"featured_character_s\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Which titles have 18.73 u.s. viewers." }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_1130632_1\" WHERE \"u_s_viewers_million\"='18.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1130632_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"featured_character_s\" text,\n \"original_air_date\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who wrote all the shows with 18.73 u.s. viewers?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_1130632_1\" WHERE \"u_s_viewers_million\"='18.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: What is the rank where the area is Los Angeles?" }, { "role": "assistant", "content": "SELECT \"rank_wjc\" FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"metro_area\"='Los Angeles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: What is the number of jews where the rank is 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"number_of_jews_wjc\") FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"rank_arda\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas_with_largest_jewish_p\" (\n \"rank_wjc\" real,\n \"rank_arda\" real,\n \"metro_area\" text,\n \"number_of_jews_wjc\" real,\n \"number_of_jews_asarb\" real\n);\n\nQuestion: What is the number of jews asarb where the metro area is philadelphia?" }, { "role": "assistant", "content": "SELECT \"number_of_jews_asarb\" FROM \"metropolitan_areas_with_largest_jewish_p\" WHERE \"metro_area\"='Philadelphia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_iv\" text,\n \"u15_2nd_iv\" text,\n \"u15_3rd_iv\" text,\n \"u15_4th_iv\" text,\n \"u15_5th_iv\" text,\n \"u15_6th_iv\" text\n);\n\nQuestion: what are all the open 1st viii with u15 6th iv being bgs" }, { "role": "assistant", "content": "SELECT \"open_1st_viii\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_6th_iv\"='BGS';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_iv\" text,\n \"u15_2nd_iv\" text,\n \"u15_3rd_iv\" text,\n \"u15_4th_iv\" text,\n \"u15_5th_iv\" text,\n \"u15_6th_iv\" text\n);\n\nQuestion: what are all the u16 2nd viii with u15 3rd iv being bbc" }, { "role": "assistant", "content": "SELECT \"u16_2nd_viii\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_3rd_iv\"='BBC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_iv\" text,\n \"u15_2nd_iv\" text,\n \"u15_3rd_iv\" text,\n \"u15_4th_iv\" text,\n \"u15_5th_iv\" text,\n \"u15_6th_iv\" text\n);\n\nQuestion: what are all the open 1st viii with u15 4th iv being gt" }, { "role": "assistant", "content": "SELECT \"open_1st_viii\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_4th_iv\"='GT';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_iv\" text,\n \"u15_2nd_iv\" text,\n \"u15_3rd_iv\" text,\n \"u15_4th_iv\" text,\n \"u15_5th_iv\" text,\n \"u15_6th_iv\" text\n);\n\nQuestion: how many crew had u15 3rd iv being bgs and u15 1st iv being acgs and open 1st viii being acgs" }, { "role": "assistant", "content": "SELECT COUNT(\"crew\") FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_3rd_iv\"='BGS' AND \"u15_1st_iv\"='ACGS' AND \"open_1st_viii\"='ACGS';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_iv\" text,\n \"u15_2nd_iv\" text,\n \"u15_3rd_iv\" text,\n \"u15_4th_iv\" text,\n \"u15_5th_iv\" text,\n \"u15_6th_iv\" text\n);\n\nQuestion: what are all the u15 3rd iv with u15 4th iv being bbc" }, { "role": "assistant", "content": "SELECT \"u15_3rd_iv\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_4th_iv\"='BBC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_iv\" text,\n \"u15_2nd_iv\" text,\n \"u15_3rd_iv\" text,\n \"u15_4th_iv\" text,\n \"u15_5th_iv\" text,\n \"u15_6th_iv\" text\n);\n\nQuestion: how many open 2nd viii had u15 3rd iv being gt" }, { "role": "assistant", "content": "SELECT COUNT(\"open_2nd_viii\") FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_3rd_iv\"='GT';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"day_boarding\" text,\n \"school_colours\" text,\n \"abbreviation\" text,\n \"in_competition_since\" real\n);\n\nQuestion: How many schools have an enrollment of 850?" }, { "role": "assistant", "content": "SELECT COUNT(\"founded\") FROM \"winning_head_of_the_river_championship_e\" WHERE \"enrolment\"=850;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"day_boarding\" text,\n \"school_colours\" text,\n \"abbreviation\" text,\n \"in_competition_since\" real\n);\n\nQuestion: What is the location of the school named Brisbane Girls' Grammar School?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"school\"='Brisbane Girls'' Grammar School';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"day_boarding\" text,\n \"school_colours\" text,\n \"abbreviation\" text,\n \"in_competition_since\" real\n);\n\nQuestion: How many schools are located in South Brisbane?" }, { "role": "assistant", "content": "SELECT COUNT(\"school\") FROM \"winning_head_of_the_river_championship_e\" WHERE \"location\"='South Brisbane';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"day_boarding\" text,\n \"school_colours\" text,\n \"abbreviation\" text,\n \"in_competition_since\" real\n);\n\nQuestion: When was SPLC founded?" }, { "role": "assistant", "content": "SELECT MIN(\"founded\") FROM \"winning_head_of_the_river_championship_e\" WHERE \"abbreviation\"='SPLC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"school\" text,\n \"location\" text,\n \"enrolment\" real,\n \"founded\" real,\n \"denomination\" text,\n \"day_boarding\" text,\n \"school_colours\" text,\n \"abbreviation\" text,\n \"in_competition_since\" real\n);\n\nQuestion: What is the enrollment of STM which has been in competition since 1990?" }, { "role": "assistant", "content": "SELECT COUNT(\"enrolment\") FROM \"winning_head_of_the_river_championship_e\" WHERE \"in_competition_since\"=1990 AND \"abbreviation\"='STM';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"rd\" real,\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What number is the Monaco Grand Prix?" }, { "role": "assistant", "content": "SELECT \"rd\" FROM \"grands_prix\" WHERE \"grand_prix\"='Monaco Grand Prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"rd\" real,\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who is in the pole position for the French Grand Prix?" }, { "role": "assistant", "content": "SELECT \"pole_position\" FROM \"grands_prix\" WHERE \"grand_prix\"='French Grand Prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"rd\" real,\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What are the numbers for the raceways that are constructed by Ferrari, with Michael Schumacher holding the fastest lap and pole position?" }, { "role": "assistant", "content": "SELECT \"rd\" FROM \"grands_prix\" WHERE \"fastest_lap\"='Michael Schumacher' AND \"constructor\"='Ferrari' AND \"pole_position\"='Michael Schumacher';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"rd\" real,\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: How many on the list are called the Austrian Grand Prix?" }, { "role": "assistant", "content": "SELECT COUNT(\"rd\") FROM \"grands_prix\" WHERE \"grand_prix\"='Austrian Grand Prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"rd\" real,\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What number is the Canadian Grand Prix on the list?" }, { "role": "assistant", "content": "SELECT \"rd\" FROM \"grands_prix\" WHERE \"grand_prix\"='Canadian Grand Prix';" } ]