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