text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1973" ( "date" text, "city" text, "opponent" text, "results" text, "type_of_game" text ); Question: what type of game has the resuts of 1:0? <|assistant|> SELECT "type_of_game" FROM "1973" WHERE "results"='1:0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "all_time_most_appearances" ( "ranking" real, "nationality" text, "name" text, "games" real, "years" text ); Question: What is the average Games for 1965–1981, and a Ranking larger than 4? <|assistant|> SELECT AVG("games") FROM "all_time_most_appearances" WHERE "years"='1965–1981' AND "ranking">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "all_time_most_appearances" ( "ranking" real, "nationality" text, "name" text, "games" real, "years" text ); Question: What is the Years when games shows 550? <|assistant|> SELECT "years" FROM "all_time_most_appearances" WHERE "games"=550;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "all_time_most_appearances" ( "ranking" real, "nationality" text, "name" text, "games" real, "years" text ); Question: What is the Nationality that shows 4 as the ranking? <|assistant|> SELECT "nationality" FROM "all_time_most_appearances" WHERE "ranking"=4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rotavirus_genes_and_proteins" ( "rna_segment_gene" real, "size_s_base_pair" real, "protein" text, "molecular_weight_k_da" text, "location" text, "copies_per_particle" text ); Question: Which location has a copies per particle of 0 and a protein of nsp3? <|assistant|> SELECT "location" FROM "rotavirus_genes_and_proteins" WHERE "copies_per_particle"='0' AND "protein"='nsp3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rotavirus_genes_and_proteins" ( "rna_segment_gene" real, "size_s_base_pair" real, "protein" text, "molecular_weight_k_da" text, "location" text, "copies_per_particle" text ); Question: How many copies per particle does the protein nsp2 have? <|assistant|> SELECT "copies_per_particle" FROM "rotavirus_genes_and_proteins" WHERE "protein"='nsp2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rotavirus_genes_and_proteins" ( "rna_segment_gene" real, "size_s_base_pair" real, "protein" text, "molecular_weight_k_da" text, "location" text, "copies_per_particle" text ); Question: What is the highest RNA segment having a protein of vp2 and a base pair size over 2690? <|assistant|> SELECT MAX("rna_segment_gene") FROM "rotavirus_genes_and_proteins" WHERE "protein"='vp2' AND "size_s_base_pair">2690;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rotavirus_genes_and_proteins" ( "rna_segment_gene" real, "size_s_base_pair" real, "protein" text, "molecular_weight_k_da" text, "location" text, "copies_per_particle" text ); Question: What is the number of copies per particle having a nonstructural location, an RNA segment over 5 and a base pair size under 751? <|assistant|> SELECT "copies_per_particle" FROM "rotavirus_genes_and_proteins" WHERE "location"='nonstructural' AND "rna_segment_gene">5 AND "size_s_base_pair"<751;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: Who won the bronze medal in Hiroshima? <|assistant|> SELECT "bronze" FROM "individual" WHERE "location"='hiroshima';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: Who won the silver medal in the games where Hong Chia-yuh took home bronze? <|assistant|> SELECT "silver" FROM "individual" WHERE "bronze"='hong chia-yuh';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: Where did Michael Eric Bibat win bronze? <|assistant|> SELECT "location" FROM "individual" WHERE "bronze"='michael eric bibat';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: Who won gold in the games where Pan Cheng-Tsung won silver? <|assistant|> SELECT "gold" FROM "individual" WHERE "silver"='pan cheng-tsung';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many Bronzes that has a Silver of 0, and a Gold of 0, and a Nation of denmark, and a Total larger than 1? <|assistant|> SELECT SUM("bronze") FROM "medal_table" WHERE "silver"=0 AND "gold"=0 AND "nation"='denmark' AND "total">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many Bronzes that has a Nation of italy? <|assistant|> SELECT MAX("bronze") FROM "medal_table" WHERE "nation"='italy';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many Silvers that has a Gold smaller than 1, and a Rank of 9, and a Total smaller than 1? <|assistant|> SELECT SUM("silver") FROM "medal_table" WHERE "gold"<1 AND "rank"='9' AND "total"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: Which Bronze has a Nation of spain? <|assistant|> SELECT MAX("bronze") FROM "medal_table" WHERE "nation"='spain';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members" ( "name" text, "date" text, "goals" real, "assists" real, "team" text, "venue" text, "opponent" text, "competition" text, "total_goals" real, "total_assists" real ); Question: Who was the opponent at the competition held at Jeonju? <|assistant|> SELECT "opponent" FROM "members" WHERE "venue"='jeonju';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_and_results" ( "game" real, "january" real, "opponent" text, "score" text, "record" text ); Question: How many Januarys had records of 22-15-6? <|assistant|> SELECT COUNT("january") FROM "schedule_and_results" WHERE "record"='22-15-6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "event_circuit" text, "city_state" text, "date" text, "format" text, "winner" text, "team" text ); Question: what is the date of barbagallo raceway? <|assistant|> SELECT "date" FROM "calendar" WHERE "event_circuit"='barbagallo raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "calendar" ( "event_circuit" text, "city_state" text, "date" text, "format" text, "winner" text, "team" text ); Question: What city is the hidden valley raceway in? <|assistant|> SELECT "city_state" FROM "calendar" WHERE "event_circuit"='hidden valley raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "april" ( "game_num" real, "date" text, "visitor" text, "score" text, "home" text, "record" text, "points" real ); Question: What was the score in game 81? <|assistant|> SELECT "score" FROM "april" WHERE "game_num"=81;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "april" ( "game_num" real, "date" text, "visitor" text, "score" text, "home" text, "record" text, "points" real ); Question: What was the record after game 79? <|assistant|> SELECT "record" FROM "april" WHERE "game_num"=79;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "april" ( "game_num" real, "date" text, "visitor" text, "score" text, "home" text, "record" text, "points" real ); Question: Who was the home team on April 15? <|assistant|> SELECT "home" FROM "april" WHERE "date"='april 15';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "administrative_divisions" ( "name" text, "hanzi" text, "hanyu_pinyin" text, "population_2010_11_01" text, "area_km" text, "density_km" text ); Question: What is the Pinyin for 依兰县? <|assistant|> SELECT "hanyu_pinyin" FROM "administrative_divisions" WHERE "hanzi"='依兰县';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "administrative_divisions" ( "name" text, "hanzi" text, "hanyu_pinyin" text, "population_2010_11_01" text, "area_km" text, "density_km" text ); Question: What is the Pinyin for the item that has a density of 77? <|assistant|> SELECT "hanyu_pinyin" FROM "administrative_divisions" WHERE "density_km"='77';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "administrative_divisions" ( "name" text, "hanzi" text, "hanyu_pinyin" text, "population_2010_11_01" text, "area_km" text, "density_km" text ); Question: What is the population for the area that has a Hanzi of 延寿县? <|assistant|> SELECT "population_2010_11_01" FROM "administrative_divisions" WHERE "hanzi"='延寿县';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "administrative_divisions" ( "name" text, "hanzi" text, "hanyu_pinyin" text, "population_2010_11_01" text, "area_km" text, "density_km" text ); Question: What is the population as of 11-01-2010 for Bayan County? <|assistant|> SELECT "population_2010_11_01" FROM "administrative_divisions" WHERE "name"='bayan county';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "administrative_divisions" ( "name" text, "hanzi" text, "hanyu_pinyin" text, "population_2010_11_01" text, "area_km" text, "density_km" text ); Question: What is the Hanzi for píngfáng qū? <|assistant|> SELECT "hanzi" FROM "administrative_divisions" WHERE "hanyu_pinyin"='píngfáng qū';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "combined" text ); Question: Which Slalom has an overall of 25 in the 2009 season? <|assistant|> SELECT "slalom" FROM "season_standings" WHERE "overall"='25' AND "season"=2009;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "combined" text ); Question: What is the earliest season with a Giant Slalom of 5? <|assistant|> SELECT MIN("season") FROM "season_standings" WHERE "giant_slalom"='5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "combined" text ); Question: Which combined score has an overall of 8? <|assistant|> SELECT "combined" FROM "season_standings" WHERE "overall"='8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "combined" text ); Question: Which Super Ghas a missed season due to injury? <|assistant|> SELECT "super_g" FROM "season_standings" WHERE "overall"='missed season due to injury';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: Name the most events with cuts made more than 6 and top 25 more than 30 <|assistant|> SELECT MAX("events") FROM "summary" WHERE "cuts_made">6 AND "top_25">30;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: Name the top-10 with top-5 less than 1 <|assistant|> SELECT "top_10" FROM "summary" WHERE "top_5"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: Name the averae top 25 with events less than 0 <|assistant|> SELECT AVG("top_25") FROM "summary" WHERE "events"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: Name the total number of top 10 with top 25 less than 2 and top 5 more than 0 <|assistant|> SELECT COUNT("top_10") FROM "summary" WHERE "top_25"<2 AND "top_5">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "0_6_0_0_6_0_garratt_production_list_all_" ( "gauge" text, "railway" text, "works_no" text, "year" text, "builder" text ); Question: In what Year is the Gauge 2 ft 6 in? <|assistant|> SELECT "year" FROM "0_6_0_0_6_0_garratt_production_list_all_" WHERE "gauge"='2 ft 6 in';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "0_6_0_0_6_0_garratt_production_list_all_" ( "gauge" text, "railway" text, "works_no" text, "year" text, "builder" text ); Question: In what Year is the Works No. 2040-2049? <|assistant|> SELECT "year" FROM "0_6_0_0_6_0_garratt_production_list_all_" WHERE "works_no"='2040-2049';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "0_6_0_0_6_0_garratt_production_list_all_" ( "gauge" text, "railway" text, "works_no" text, "year" text, "builder" text ); Question: In what Year is the Works no. 2040-2049? <|assistant|> SELECT "year" FROM "0_6_0_0_6_0_garratt_production_list_all_" WHERE "works_no"='2040-2049';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "0_6_0_0_6_0_garratt_production_list_all_" ( "gauge" text, "railway" text, "works_no" text, "year" text, "builder" text ); Question: What is the Gauge of Builder Beyer, Peacock? <|assistant|> SELECT "gauge" FROM "0_6_0_0_6_0_garratt_production_list_all_" WHERE "builder"='beyer, peacock';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text ); Question: Which round has the record of 5-0? <|assistant|> SELECT "round" FROM "mixed_martial_arts_record" WHERE "record"='5-0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text ); Question: Which method has the record of 11-1? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "record"='11-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text ); Question: The UFC 44 event has what method? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "event"='ufc 44';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text ); Question: Which event has 12-1 as a record? <|assistant|> SELECT "event" FROM "mixed_martial_arts_record" WHERE "record"='12-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text ); Question: What round was a loss with a record of 12-3? <|assistant|> SELECT "round" FROM "mixed_martial_arts_record" WHERE "res"='loss' AND "record"='12-3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text ); Question: The record of 11-1 used what method? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "record"='11-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_11_5_6" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: What surface was the match on November 6, 1982 played on? <|assistant|> SELECT "surface" FROM "doubles_11_5_6" WHERE "date"='november 6, 1982';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams_and_standings" ( "team" text, "players" text, "placing" real, "round_robin_w_l" text, "matches_w_l" text, "sets_w_l" text ); Question: What place did russia finish in? <|assistant|> SELECT COUNT("placing") FROM "teams_and_standings" WHERE "team"='russia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_class" ( "class" text, "season" text, "race" real, "podiums" real, "pole" real, "f_lap" real, "w_chmp" real ); Question: What's the WChmp of the race greater than 42 and pole greater than 11? <|assistant|> SELECT COUNT("w_chmp") FROM "by_class" WHERE "race">42 AND "pole">11;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_class" ( "class" text, "season" text, "race" real, "podiums" real, "pole" real, "f_lap" real, "w_chmp" real ); Question: If podiums are 26, what's the lowest WChmp? <|assistant|> SELECT MIN("w_chmp") FROM "by_class" WHERE "podiums"=26;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_class" ( "class" text, "season" text, "race" real, "podiums" real, "pole" real, "f_lap" real, "w_chmp" real ); Question: If the class is total, what is the total number of podiums? <|assistant|> SELECT COUNT("podiums") FROM "by_class" WHERE "class"='total';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_class" ( "class" text, "season" text, "race" real, "podiums" real, "pole" real, "f_lap" real, "w_chmp" real ); Question: During race 14, what's the podiums? <|assistant|> SELECT MAX("podiums") FROM "by_class" WHERE "race"=14;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_good_news_network_in_spanish" ( "call_sign" text, "frequency_m_hz" real, "city_of_license" text, "erp_w" text, "class" text, "fcc_info" text ); Question: What Call sign has a City of license of higgston, ga? <|assistant|> SELECT "call_sign" FROM "the_good_news_network_in_spanish" WHERE "city_of_license"='higgston, ga';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_good_news_network_in_spanish" ( "call_sign" text, "frequency_m_hz" real, "city_of_license" text, "erp_w" text, "class" text, "fcc_info" text ); Question: What City of license has a ERP W of 2,000? <|assistant|> SELECT "city_of_license" FROM "the_good_news_network_in_spanish" WHERE "erp_w"='2,000';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_good_news_network_in_spanish" ( "call_sign" text, "frequency_m_hz" real, "city_of_license" text, "erp_w" text, "class" text, "fcc_info" text ); Question: What is the Class where City of license is lake oconee, ga? <|assistant|> SELECT "class" FROM "the_good_news_network_in_spanish" WHERE "city_of_license"='lake oconee, ga';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" real, "finish" real, "team" text ); Question: What chassis has 2012 as the year? <|assistant|> SELECT "chassis" FROM "indianapolis_500" WHERE "year"=2012;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" real, "finish" real, "team" text ); Question: What engine has a start less than 7, and 23 as a finish? <|assistant|> SELECT "engine" FROM "indianapolis_500" WHERE "start"<7 AND "finish"=23;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" real, "finish" real, "team" text ); Question: What is the average finish that has a start greater than 3, with honda as the engine, and 2011 as the year? <|assistant|> SELECT AVG("finish") FROM "indianapolis_500" WHERE "start">3 AND "engine"='honda' AND "year"=2011;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" real, "finish" real, "team" text ); Question: How many starts have a year prior to 2012, and team penske as the team, with a finish greater than 27? <|assistant|> SELECT SUM("start") FROM "indianapolis_500" WHERE "year"<2012 AND "team"='team penske' AND "finish">27;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500" ( "year" real, "chassis" text, "engine" text, "start" real, "finish" real, "team" text ); Question: What start has a year later than 2010, and chip ganassi racing as the team? <|assistant|> SELECT "start" FROM "indianapolis_500" WHERE "year">2010 AND "team"='chip ganassi racing';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "penalty_shootouts" ( "date" text, "competition" text, "opponents" text, "venue" text, "score" text ); Question: Who was the opponent at the Football League Trophy competition? <|assistant|> SELECT "opponents" FROM "penalty_shootouts" WHERE "competition"='football league trophy';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "penalty_shootouts" ( "date" text, "competition" text, "opponents" text, "venue" text, "score" text ); Question: What was the opponent at the League Play Offs at home? <|assistant|> SELECT "opponents" FROM "penalty_shootouts" WHERE "venue"='home' AND "competition"='league play offs';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "penalty_shootouts" ( "date" text, "competition" text, "opponents" text, "venue" text, "score" text ); Question: What venue held that game against the Queens Park Rangers? <|assistant|> SELECT "venue" FROM "penalty_shootouts" WHERE "opponents"='queens park rangers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "penalty_shootouts" ( "date" text, "competition" text, "opponents" text, "venue" text, "score" text ); Question: Who was the opponent at the away game with a score of 5-4? <|assistant|> SELECT "opponents" FROM "penalty_shootouts" WHERE "venue"='away' AND "score"='5-4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "penalty_shootouts" ( "date" text, "competition" text, "opponents" text, "venue" text, "score" text ); Question: Who was the opponent at the League Cup competition with a score of 3-1? <|assistant|> SELECT "opponents" FROM "penalty_shootouts" WHERE "competition"='league cup' AND "score"='3-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text, "team_classification" text, "combativity_award" text ); Question: Name the team classification for stage of 20 <|assistant|> SELECT "team_classification" FROM "classification_leadership" WHERE "stage"='20';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text, "team_classification" text, "combativity_award" text ); Question: Name the winner with mountains classification of franco pellizotti and combativity award of martijn maaskant <|assistant|> SELECT "winner" FROM "classification_leadership" WHERE "mountains_classification"='franco pellizotti' AND "combativity_award"='martijn maaskant';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text, "team_classification" text, "combativity_award" text ); Question: Name the general classification with roman kreuziger and points classification of fabian cancellara <|assistant|> SELECT "general_classification" FROM "classification_leadership" WHERE "young_rider_classification"='roman kreuziger' AND "points_classification"='fabian cancellara';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text, "team_classification" text, "combativity_award" text ); Question: Name the combativity award with winner of luis león sánchez <|assistant|> SELECT "combativity_award" FROM "classification_leadership" WHERE "winner"='luis león sánchez';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_two" ( "order" real, "episode" text, "air_date" text, "u_s_timeslot_est" text, "18_49" real, "viewers" real ); Question: What is the sum of numbers listed in 18-49 for the episode that aired on June 25, 2009 with an order larger than 29? <|assistant|> SELECT SUM("18_49") FROM "season_two" WHERE "air_date"='june 25, 2009' AND "order">29;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_two" ( "order" real, "episode" text, "air_date" text, "u_s_timeslot_est" text, "18_49" real, "viewers" real ); Question: What is the total 18-49 for the episode that aired on July 2, 2009 with more than 3.5 viewers? <|assistant|> SELECT COUNT("18_49") FROM "season_two" WHERE "air_date"='july 2, 2009' AND "viewers">3.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_two" ( "order" real, "episode" text, "air_date" text, "u_s_timeslot_est" text, "18_49" real, "viewers" real ); Question: What was the timeslot in the US for the episode, "the farm"? <|assistant|> SELECT "u_s_timeslot_est" FROM "season_two" WHERE "episode"='\"the farm\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_two" ( "order" real, "episode" text, "air_date" text, "u_s_timeslot_est" text, "18_49" real, "viewers" real ); Question: What is the average 18-49 for the episode that had an order number higher than 35 and less than 3.5 viewers? <|assistant|> SELECT AVG("18_49") FROM "season_two" WHERE "viewers"<3.5 AND "order">35;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_two" ( "order" real, "episode" text, "air_date" text, "u_s_timeslot_est" text, "18_49" real, "viewers" real ); Question: What is the episode name that aired on July 23, 2009 with more than 3.31 viewers? <|assistant|> SELECT "episode" FROM "season_two" WHERE "air_date"='july 23, 2009' AND "viewers">3.31;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "studio_albums" ( "year" real, "album" text, "oricon_position" real, "1st_week_sales" text, "copies_sold" text ); Question: What year sold 1,695,900+ copies with an Oricon position larger than 1? <|assistant|> SELECT AVG("year") FROM "studio_albums" WHERE "copies_sold"='1,695,900+' AND "oricon_position">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "studio_albums" ( "year" real, "album" text, "oricon_position" real, "1st_week_sales" text, "copies_sold" text ); Question: How many copies were sold where the position is lager than 1 in 1988? <|assistant|> SELECT "copies_sold" FROM "studio_albums" WHERE "oricon_position">1 AND "year"=1988;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "studio_albums" ( "year" real, "album" text, "oricon_position" real, "1st_week_sales" text, "copies_sold" text ); Question: How many copies were sold when the 1st week sales were 4,590+? <|assistant|> SELECT "copies_sold" FROM "studio_albums" WHERE "1st_week_sales"='4,590+';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_wins_7" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: What was the Winning Score on May 29, 1977? <|assistant|> SELECT "winning_score" FROM "lpga_tour_wins_7" WHERE "date"='may 29, 1977';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_wins_7" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: On what Date was Patty Sheehan Runner(s)-up? <|assistant|> SELECT "date" FROM "lpga_tour_wins_7" WHERE "runner_s_up"='patty sheehan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_wins_7" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: On what Date was Judy Rankin Runner(s)-up? <|assistant|> SELECT "date" FROM "lpga_tour_wins_7" WHERE "runner_s_up"='judy rankin';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_wins_7" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: On what Date was the Winning score –8 (69-72-70-69=280)? <|assistant|> SELECT "date" FROM "lpga_tour_wins_7" WHERE "winning_score"='–8 (69-72-70-69=280)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_wins_7" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: On what Date was Carole Charbonnier a Runner(s)-up with a 1 stroke Margin of victory? <|assistant|> SELECT "date" FROM "lpga_tour_wins_7" WHERE "margin_of_victory"='1 stroke' AND "runner_s_up"='carole charbonnier';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_wins_7" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); Question: What Tournament has a Winning score of +3 (71-72-70=213)? <|assistant|> SELECT "tournament" FROM "lpga_tour_wins_7" WHERE "winning_score"='+3 (71-72-70=213)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "february" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: What date did the team play home in Toronto? <|assistant|> SELECT "date" FROM "february" WHERE "home"='toronto';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "february" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: How many people attended the game when Larry Hughes(33) was the leading scorer and cleveland was visiting? <|assistant|> SELECT SUM("attendance") FROM "february" WHERE "visitor"='cleveland' AND "leading_scorer"='larry hughes(33)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "february" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); Question: When did they play Utah at home? <|assistant|> SELECT "date" FROM "february" WHERE "home"='utah';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "stadium" text, "record" text, "attendance" real ); Question: What opponent has balboa stadium as the opponent? <|assistant|> SELECT "opponent" FROM "regular_season" WHERE "stadium"='balboa stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "stadium" text, "record" text, "attendance" real ); Question: What is the highest attendance that has oakland raiders as the opponent, with a week greater than 9? <|assistant|> SELECT MAX("attendance") FROM "regular_season" WHERE "opponent"='oakland raiders' AND "week">9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1999" ( "rank" real, "name" text, "headquarters" text, "primary_industry" text, "market_value_usd_million" real ); Question: Where is the headquarter of the conglomerate industry? <|assistant|> SELECT "headquarters" FROM "1999" WHERE "primary_industry"='conglomerate';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What date was the game played at the venue of Hrazdan Stadium, Yerevan, Armenia? <|assistant|> SELECT "date" FROM "international_goals" WHERE "venue"='hrazdan stadium, yerevan, armenia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: Who was the bronze medal when the Asian Games were held in Busan? <|assistant|> SELECT "bronze" FROM "individual" WHERE "location"='busan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: Who won the gold when Kim Hyang-Mi won the bronze? <|assistant|> SELECT "gold" FROM "individual" WHERE "bronze"='kim hyang-mi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: What was the earliest year that Park Jung-Ah won the gold? <|assistant|> SELECT MIN("year") FROM "individual" WHERE "gold"='park jung-ah';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "individual" ( "year" real, "location" text, "gold" text, "silver" text, "bronze" text ); Question: Who won the bronze when the Asian Games were in Doha? <|assistant|> SELECT "bronze" FROM "individual" WHERE "location"='doha';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); Question: What was the Attendance on November 29, 1953? <|assistant|> SELECT SUM("attendance") FROM "schedule" WHERE "date"='november 29, 1953';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); Question: After Week 5, what was the Result of the game with Attendance greater than 22,057? <|assistant|> SELECT "result" FROM "schedule" WHERE "attendance">'22,057' AND "week">5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nfl_draft" ( "pick_num" real, "nfl_team" text, "player" text, "position" text, "college" text ); Question: Which NFL team picked Patrick Collins? <|assistant|> SELECT "nfl_team" FROM "nfl_draft" WHERE "player"='patrick collins';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nfl_draft" ( "pick_num" real, "nfl_team" text, "player" text, "position" text, "college" text ); Question: Which NFL team picked a player for the Wide Receiver position? <|assistant|> SELECT "nfl_team" FROM "nfl_draft" WHERE "position"='wide receiver';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "tournament" text, "venue" text, "result" text, "extra" text ); Question: What result has a year after 2002? <|assistant|> SELECT "result" FROM "achievements" WHERE "year">2002;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "tournament" text, "venue" text, "result" text, "extra" text ); Question: What tournament has a year prior to 2001? <|assistant|> SELECT "tournament" FROM "achievements" WHERE "year"<2001;<|endoftext|>