text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1482_1700" ( "name" text, "father" text, "birth" text, "marriage" text, "became_countess" text, "ceased_to_be_countess" text, "death" text, "spouse" text ); Question: When did elisabeth of valois die? <|assistant|> SELECT "death" FROM "1482_1700" WHERE "name"='elisabeth of valois';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Who is entered earlier than 1975 and has a Lotus 20 chassis? <|assistant|> SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year"<1975 AND "chassis"='lotus 20';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Which engine has a Lotus 49c chassis? <|assistant|> SELECT "engine" FROM "complete_formula_one_world_championship_" WHERE "chassis"='lotus 49c';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What are the average points of Scuderia Scribante with a Brabham bt11 chassis before 1968? <|assistant|> SELECT AVG("points") FROM "complete_formula_one_world_championship_" WHERE "entrant"='scuderia scribante' AND "chassis"='brabham bt11' AND "year"<1968;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: How many points are there for a Mclaren m23 chassis later than 1972? <|assistant|> SELECT COUNT("points") FROM "complete_formula_one_world_championship_" WHERE "year">1972 AND "chassis"='mclaren m23';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list" ( "rural_municipality_rm" text, "rm_no" text, "sarm_div_no" text, "census_div_no" text, "population_2011" real, "population_2006" real, "change_pct" real, "land_area_km" real, "population_density_per_km" real ); Question: What is the average change to have a land area of 546.74 and a population density greater than 0.5? <|assistant|> SELECT AVG("change_pct") FROM "list" WHERE "land_area_km"=546.74 AND "population_density_per_km">0.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" text, "finish" text, "team" text ); Question: What was the result after 1994 for team MB2 and 31 starts? <|assistant|> SELECT "finish" FROM "daytona_500_results" WHERE "year">1994 AND "team"='mb2' AND "start"='31';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" text, "finish" text, "team" text ); Question: What team has 33 starts? <|assistant|> SELECT "team" FROM "daytona_500_results" WHERE "start"='33';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" text, "finish" text, "team" text ); Question: What team finished 35 in a ford before 1997? <|assistant|> SELECT "team" FROM "daytona_500_results" WHERE "year"<1997 AND "manufacturer"='ford' AND "finish"='35';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "venue" text, "winner" text, "country" text, "score" real ); Question: What was the sum of the scores before the year 2002, that had the venue of Halmstad? <|assistant|> SELECT SUM("score") FROM "winners" WHERE "venue"='halmstad' AND "year"<2002;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "venue" text, "winner" text, "country" text, "score" real ); Question: What was France's highest score when the venue was Bokskogens? <|assistant|> SELECT MAX("score") FROM "winners" WHERE "country"='france' AND "venue"='bokskogens';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "venue" text, "winner" text, "country" text, "score" real ); Question: What was the earliest year during which the winner was Matthew King, and during which the score was higher than 270? <|assistant|> SELECT MIN("year") FROM "winners" WHERE "winner"='matthew king' AND "score">270;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "venue" text, "winner" text, "country" text, "score" real ); Question: What was the average year during which the score was 270? <|assistant|> SELECT AVG("year") FROM "winners" WHERE "score"=270;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "venue" text, "winner" text, "country" text, "score" real ); Question: What were the total number scores after 2005, when the winner was David Patrick? <|assistant|> SELECT COUNT("score") FROM "winners" WHERE "winner"='david patrick' AND "year">2005;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "venue" text, "winner" text, "country" text, "score" real ); Question: What was the average year that the venue was Bokskogens? <|assistant|> SELECT AVG("year") FROM "winners" WHERE "venue"='bokskogens';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: Who did the Toronto Blue Jays play against where the score was 4 - 2? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "score"='4 - 2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: Who did the Blue Jays play against on April 11? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "date"='april 11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: Who did the Blue Jays play against on April 24? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "date"='april 24';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pctof_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: What was the average Value ($M) when the Country was England, the Operating income($m) was greater than -5, and the Revenue ($M) was smaller than 103? <|assistant|> SELECT AVG("value_m") FROM "2008_rankings" WHERE "country"='england' AND "operating_income_m">-5 AND "revenue_m"<103;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pctof_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: What was the total amount of Value ($M), when the Country was Spain, the Rank was 19, and the Debt as % of value was larger than 159? <|assistant|> SELECT COUNT("value_m") FROM "2008_rankings" WHERE "country"='spain' AND "rank"=19 AND "debt_as_pctof_value">159;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pctof_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: What was the sum of Value ($M), when the Revenue ($M) was less than 307, the Team was Valencia, and the Rank was smaller than 19? <|assistant|> SELECT SUM("value_m") FROM "2008_rankings" WHERE "revenue_m"<307 AND "team"='valencia' AND "rank"<19;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pctof_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: What was the total amount of Value ($M), when the Rank was higher than 6, and the % change on year was -27? <|assistant|> SELECT COUNT("value_m") FROM "2008_rankings" WHERE "rank">6 AND "pct_change_on_year"='-27';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pctof_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: What was the sum of Revenue ($M), when the Debt as % of value was higher than 27, and the Operating income($m) was 77? <|assistant|> SELECT SUM("revenue_m") FROM "2008_rankings" WHERE "debt_as_pctof_value">27 AND "operating_income_m"=77;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "negotiation_progress" ( "screening_started" text, "screening_completed" text, "chapter_unfrozen" text, "chapter_opened" text, "chapter_closed" text ); Question: Name the screening completed for screening started 23 january 2006 <|assistant|> SELECT "screening_completed" FROM "negotiation_progress" WHERE "screening_started"='23 january 2006';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "negotiation_progress" ( "screening_started" text, "screening_completed" text, "chapter_unfrozen" text, "chapter_opened" text, "chapter_closed" text ); Question: Name the screening started when it was completed 3 may 2006 <|assistant|> SELECT "screening_started" FROM "negotiation_progress" WHERE "screening_completed"='3 may 2006';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_nominations" ( "year" real, "ceremony" text, "result" text, "award" text, "work" text ); Question: What award was Trent Tesoro nominated for in 2007? <|assistant|> SELECT "award" FROM "awards_nominations" WHERE "result"='nominated' AND "year"=2007;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "site" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: What is the score for the team that has a record of 80-64? <|assistant|> SELECT "score" FROM "game_log" WHERE "record"='80-64';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500_results" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); Question: What position did team scandia finish when their engine was cosworth? <|assistant|> SELECT "finish" FROM "indianapolis_500_results" WHERE "engine"='cosworth' AND "team"='team scandia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indianapolis_500_results" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); Question: What was the position of the team that used an oldsmobile engine and DNQ? <|assistant|> SELECT "finish" FROM "indianapolis_500_results" WHERE "engine"='oldsmobile' AND "start"='dnq';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: what is the least bronze when gold is more than 0 for russia? <|assistant|> SELECT MIN("bronze") FROM "medal_table" WHERE "gold">0 AND "nation"='russia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: what is the highest rank for italy when gold is more than 1? <|assistant|> SELECT MAX("rank") FROM "medal_table" WHERE "nation"='italy' AND "gold">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: what is the total when bronze is more than 1 and gold smaller than 1? <|assistant|> SELECT SUM("total") FROM "medal_table" WHERE "bronze">1 AND "gold"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sigma_mass_storage_devices" ( "device" real, "device_type" text, "capacity_mb" text, "avg_seek_time_ms" text, "avg_rotational_delay_ms" real, "avg_transfer_rate_k_b_s" real ); Question: What is the avg seek time for a device that is less than 3231? <|assistant|> SELECT "avg_seek_time_ms" FROM "sigma_mass_storage_devices" WHERE "device"<3231;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sigma_mass_storage_devices" ( "device" real, "device_type" text, "capacity_mb" text, "avg_seek_time_ms" text, "avg_rotational_delay_ms" real, "avg_transfer_rate_k_b_s" real ); Question: What is the smallest transfer rate for a 3243 device? <|assistant|> SELECT MIN("avg_transfer_rate_k_b_s") FROM "sigma_mass_storage_devices" WHERE "device"=3243;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: Which entrant has a year after 1955? <|assistant|> SELECT "entrant" FROM "complete_formula_one_world_championship_" WHERE "year">1955;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many draws has a Club of real valladolid that was played less than 38? <|assistant|> SELECT MAX("draws") FROM "final_table" WHERE "club"='real valladolid' AND "played"<38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many losses are there with 5 goal differences, drew more than 10 times, and 43 goals against? <|assistant|> SELECT COUNT("losses") FROM "final_table" WHERE "goal_difference"=5 AND "draws">10 AND "goals_against"=43;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "award_show" text, "category" text, "recipient_s" text, "result" text ); Question: On which award show was Bad Girls nominated for Most Popular Drama in 2004? <|assistant|> SELECT "award_show" FROM "awards_and_nominations" WHERE "year"=2004 AND "category"='most popular drama';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "award_show" text, "category" text, "recipient_s" text, "result" text ); Question: Who was the recipient when the show was nominated for Most Popular Drama after 2004? <|assistant|> SELECT "recipient_s" FROM "awards_and_nominations" WHERE "result"='nominated' AND "category"='most popular drama' AND "year">2004;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "awards_and_nominations" ( "year" real, "award_show" text, "category" text, "recipient_s" text, "result" text ); Question: In what award show was Bad Girls nominated for Best Loved Drama in 2002? <|assistant|> SELECT "award_show" FROM "awards_and_nominations" WHERE "category"='best loved drama' AND "year"=2002;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the average total number of medals for a nation with 2 silver medals and a rank larger than 7? <|assistant|> SELECT AVG("total") FROM "medal_table" WHERE "silver"=2 AND "rank">7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the lowest rank of Ukraine with fewer than 14 silver medals, fewer than 3 bronze medals, and a total of 4 medals? <|assistant|> SELECT MIN("rank") FROM "medal_table" WHERE "silver"<14 AND "bronze"<3 AND "total"=4 AND "nation"='ukraine';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the total of bronze medals from nations with more than 16 total medals and ranks larger than 3? <|assistant|> SELECT COUNT("bronze") FROM "medal_table" WHERE "total"=16 AND "rank">3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the total number of bronze medals with a total of 4 medals and 1 gold medal? <|assistant|> SELECT COUNT("bronze") FROM "medal_table" WHERE "total"=4 AND "gold"=1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What was the qualification with more than 162 laps in 1953? <|assistant|> SELECT "qual" FROM "indy_500_results" WHERE "laps">162 AND "year"='1953';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What was the qualification with more than 585 laps? <|assistant|> SELECT "qual" FROM "indy_500_results" WHERE "laps"=585;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: How many laps had a qualification of 136.168? <|assistant|> SELECT COUNT("laps") FROM "indy_500_results" WHERE "qual"='136.168';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); Question: Who was appointed with the title of envoy extraordinary and minister plenipotentiary, and a termination of mission of march 16, 1905? <|assistant|> SELECT "appointed_by" FROM "see_also" WHERE "title"='envoy extraordinary and minister plenipotentiary' AND "termination_of_mission"='march 16, 1905';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2004_enlargement" ( "member_countries" text, "population" text, "area_km" text, "gdp_billion_us" text, "gdp_per_capita_us" text ); Question: What is the GDP (billion US$) of the country that has a GDP per capita (US$) of 8,861? <|assistant|> SELECT "gdp_billion_us" FROM "2004_enlargement" WHERE "gdp_per_capita_us"='8,861';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2004_enlargement" ( "member_countries" text, "population" text, "area_km" text, "gdp_billion_us" text, "gdp_per_capita_us" text ); Question: What is the name of the member country that has a Population of 1,341,664? <|assistant|> SELECT "member_countries" FROM "2004_enlargement" WHERE "population"='1,341,664';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2004_enlargement" ( "member_countries" text, "population" text, "area_km" text, "gdp_billion_us" text, "gdp_per_capita_us" text ); Question: What is the total population of the country that has a GDP per capita (US$) of 15,054? <|assistant|> SELECT "population" FROM "2004_enlargement" WHERE "gdp_per_capita_us"='15,054';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2004_enlargement" ( "member_countries" text, "population" text, "area_km" text, "gdp_billion_us" text, "gdp_per_capita_us" text ); Question: What is the name of the country that has an Area (km²) of 49,036? <|assistant|> SELECT "member_countries" FROM "2004_enlargement" WHERE "area_km"='49,036';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2004_enlargement" ( "member_countries" text, "population" text, "area_km" text, "gdp_billion_us" text, "gdp_per_capita_us" text ); Question: What is the GDP (billion US$) of the country that has an Area (km²) of 316? <|assistant|> SELECT "gdp_billion_us" FROM "2004_enlargement" WHERE "area_km"='316';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2004_enlargement" ( "member_countries" text, "population" text, "area_km" text, "gdp_billion_us" text, "gdp_per_capita_us" text ); Question: What is the GDP per capita (US$) of the country that has a Population of 2,011,473? <|assistant|> SELECT "gdp_per_capita_us" FROM "2004_enlargement" WHERE "population"='2,011,473';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "country" text, "film_title_used_in_nomination" text, "language" text, "original_title" text, "director" text ); Question: What is the original title for the Korean language film? <|assistant|> SELECT "original_title" FROM "references" WHERE "language"='korean';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "country" text, "film_title_used_in_nomination" text, "language" text, "original_title" text, "director" text ); Question: What language is the film La Diagonale du Fou in? <|assistant|> SELECT "language" FROM "references" WHERE "original_title"='la diagonale du fou';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "country" text, "film_title_used_in_nomination" text, "language" text, "original_title" text, "director" text ); Question: What was the original title of the Hindi film? <|assistant|> SELECT "original_title" FROM "references" WHERE "language"='hindi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "country" text, "film_title_used_in_nomination" text, "language" text, "original_title" text, "director" text ); Question: What language is the film Karnal in? <|assistant|> SELECT "language" FROM "references" WHERE "original_title"='karnal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "country" text, "film_title_used_in_nomination" text, "language" text, "original_title" text, "director" text ); Question: What was the film title nominated from the Netherlands? <|assistant|> SELECT "film_title_used_in_nomination" FROM "references" WHERE "country"='netherlands';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "references" ( "country" text, "film_title_used_in_nomination" text, "language" text, "original_title" text, "director" text ); Question: What was the film title nominated from the Sweden? <|assistant|> SELECT "film_title_used_in_nomination" FROM "references" WHERE "country"='sweden';<|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: On the Date of 15 June 1992 what is the Score that is listed? <|assistant|> SELECT "score" FROM "international_goals" WHERE "date"='15 june 1992';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "notes_and_references" ( "school" text, "location" text, "total" real, "crimean_war" real, "persian_war" real, "indian_mutiny" real, "1860_1878" real, "zulu_war" real, "second_afghan_war" text ); Question: How many Persian Wars have a School of rashtriya indian military college, and an 1860-1878 smaller than 0? <|assistant|> SELECT COUNT("persian_war") FROM "notes_and_references" WHERE "school"='rashtriya indian military college' AND "1860_1878"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "notes_and_references" ( "school" text, "location" text, "total" real, "crimean_war" real, "persian_war" real, "indian_mutiny" real, "1860_1878" real, "zulu_war" real, "second_afghan_war" text ); Question: What is the largest Persian War with a Crimean War of 0, an 1860-1878 larger than 0, a Location of united kingdom, and a Zulu War smaller than 1? <|assistant|> SELECT MAX("persian_war") FROM "notes_and_references" WHERE "crimean_war"=0 AND "1860_1878">0 AND "location"='united kingdom' AND "zulu_war"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "notes_and_references" ( "school" text, "location" text, "total" real, "crimean_war" real, "persian_war" real, "indian_mutiny" real, "1860_1878" real, "zulu_war" real, "second_afghan_war" text ); Question: What is the average Crimean War with a Second Afghan War totaling 1, and a School of hamblin and porter's school, cork? <|assistant|> SELECT AVG("crimean_war") FROM "notes_and_references" WHERE "second_afghan_war"='1' AND "school"='hamblin and porter''s school, cork';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "notes_and_references" ( "school" text, "location" text, "total" real, "crimean_war" real, "persian_war" real, "indian_mutiny" real, "1860_1878" real, "zulu_war" real, "second_afghan_war" text ); Question: Which Crimean War has a 1860-1878 of 0, a Total of 1, and an Indian Mutiny larger than 0? <|assistant|> SELECT "crimean_war" FROM "notes_and_references" WHERE "1860_1878"=0 AND "total"=1 AND "indian_mutiny">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "notes_and_references" ( "school" text, "location" text, "total" real, "crimean_war" real, "persian_war" real, "indian_mutiny" real, "1860_1878" real, "zulu_war" real, "second_afghan_war" text ); Question: Which school has an 1860-1878 larger than 0, and a Second Afghan War of 0? <|assistant|> SELECT "school" FROM "notes_and_references" WHERE "1860_1878">0 AND "second_afghan_war"='0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saint_petersburg_teams" ( "club" text, "league" text, "sport" text, "venue" text, "established" real ); Question: What Venue has Basketball as a Sport? <|assistant|> SELECT "venue" FROM "saint_petersburg_teams" WHERE "sport"='basketball';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saint_petersburg_teams" ( "club" text, "league" text, "sport" text, "venue" text, "established" real ); Question: What Venue has Spartak St. Petersburg Club? <|assistant|> SELECT "venue" FROM "saint_petersburg_teams" WHERE "club"='spartak st. petersburg';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saint_petersburg_teams" ( "club" text, "league" text, "sport" text, "venue" text, "established" real ); Question: What League of VSL Sport was Established in 1935? <|assistant|> SELECT "sport" FROM "saint_petersburg_teams" WHERE "established"=1935 AND "league"='vsl';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saint_petersburg_teams" ( "club" text, "league" text, "sport" text, "venue" text, "established" real ); Question: What Club Established in 2010 has a League of MHL? <|assistant|> SELECT "club" FROM "saint_petersburg_teams" WHERE "league"='mhl' AND "established"=2010;<|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, "game_site" text, "record" text, "attendance" real ); Question: What was the highest attendance week 12? <|assistant|> SELECT MAX("attendance") FROM "schedule" WHERE "week"=12;<|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, "game_site" text, "record" text, "attendance" real ); Question: What is the record for the result w 33-3? <|assistant|> SELECT "record" FROM "schedule" WHERE "result"='w 33-3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members" ( "district" text, "counties_represented" text, "delegate" text, "party" text, "first_elected" real, "committee" text ); Question: What Committee has the First Elected of 1993? <|assistant|> SELECT "committee" FROM "members" WHERE "first_elected"=1993;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members" ( "district" text, "counties_represented" text, "delegate" text, "party" text, "first_elected" real, "committee" text ); Question: What is the total number of First Elected that has counties represented of Anne Arundel, District of 30, and a Ways and Means Committee? <|assistant|> SELECT COUNT("first_elected") FROM "members" WHERE "counties_represented"='anne arundel' AND "district"='30' AND "committee"='ways and means';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members" ( "district" text, "counties_represented" text, "delegate" text, "party" text, "first_elected" real, "committee" text ); Question: What counties represented have a First Elected of 2006 and a Ways and Means Committee? <|assistant|> SELECT "counties_represented" FROM "members" WHERE "first_elected"=2006 AND "committee"='ways and means';<|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" real, "1_usd" real, "central_bank" text ); Question: For Central Bank of Uruguay, what's the 1USD=? <|assistant|> SELECT "1_usd" FROM "currency" WHERE "central_bank"='central bank of uruguay';<|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" real, "1_usd" real, "central_bank" text ); Question: What is the 1USD= that has the Uruguayan Peso (uyu) and 1 Euro is greater than 25.3797? <|assistant|> SELECT SUM("1_usd") FROM "currency" WHERE "currency"='uruguayan peso (uyu)' AND "1_euro">25.3797;<|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" real, "1_usd" real, "central_bank" text ); Question: What is the 1USD= in Chile and has 1 Euro greater than 635.134? <|assistant|> SELECT COUNT("1_usd") FROM "currency" WHERE "country"='chile' AND "1_euro">635.134;<|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" real, "1_usd" real, "central_bank" text ); Question: If the 1USD= 5,916.27, what is the lowest 1 Euro amount? <|assistant|> SELECT MIN("1_euro") FROM "currency" WHERE "1_usd"='5,916.27';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "notes" text ); Question: What is the venue when the year is after 2001 for the summer olympics? <|assistant|> SELECT "venue" FROM "achievements" WHERE "year">2001 AND "competition"='summer olympics';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: What is the total attendance for the August 8 game? <|assistant|> SELECT SUM("attendance") FROM "game_log" WHERE "date"='august 8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: Which opponent led to a 56-59 record? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "record"='56-59';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "super_league_tries" ( "date" text, "venue" text, "opponent" text, "result" text, "tournament" text, "scored" real ); Question: Where did they play that the score was 22-12? <|assistant|> SELECT "venue" FROM "super_league_tries" WHERE "result"='22-12';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "films" ( "year" real, "title" text, "role" text, "language" text, "notes" text ); Question: What language is spoken after 2007 for the role of urvashi mathur? <|assistant|> SELECT "language" FROM "films" WHERE "year">2007 AND "role"='urvashi mathur';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "films" ( "year" real, "title" text, "role" text, "language" text, "notes" text ); Question: What role is spoken in hindi in 2011? <|assistant|> SELECT "role" FROM "films" WHERE "language"='hindi' AND "year"=2011;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "films" ( "year" real, "title" text, "role" text, "language" text, "notes" text ); Question: What is the note section for the role with a language of hindi and a title of miley naa miley hum? <|assistant|> SELECT "notes" FROM "films" WHERE "language"='hindi' AND "title"='miley naa miley hum';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "track_listing" ( "title" text, "english_translation" text, "lyrics_by" text, "music_by" text, "time" text ); Question: What is the title of the song that has a translation of Without Me? <|assistant|> SELECT "title" FROM "track_listing" WHERE "english_translation"='without me';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "composition_by_molecule_type" ( "molecule" text, "percent_of_mass" text, "mol_weight_daltons" text, "molecules" text, "percent_of_molecules" text ); Question: what is the molecules when the percent mass is 1.0? <|assistant|> SELECT "molecules" FROM "composition_by_molecule_type" WHERE "percent_of_mass"='1.0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "composition_by_molecule_type" ( "molecule" text, "percent_of_mass" text, "mol_weight_daltons" text, "molecules" text, "percent_of_molecules" text ); Question: What is the percent of molecules when the mol.weight (daltons) is n/a and the molecule is other s inorganic? <|assistant|> SELECT "percent_of_molecules" FROM "composition_by_molecule_type" WHERE "mol_weight_daltons"='n/a' AND "molecule"='other s inorganic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "composition_by_molecule_type" ( "molecule" text, "percent_of_mass" text, "mol_weight_daltons" text, "molecules" text, "percent_of_molecules" text ); Question: what is the mol.weight (daltons) when the percent of mass is 1.5? <|assistant|> SELECT "mol_weight_daltons" FROM "composition_by_molecule_type" WHERE "percent_of_mass"='1.5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "composition_by_molecule_type" ( "molecule" text, "percent_of_mass" text, "mol_weight_daltons" text, "molecules" text, "percent_of_molecules" text ); Question: what is the perfect of mass when the molecules is 1.74e14*? <|assistant|> SELECT "percent_of_mass" FROM "composition_by_molecule_type" WHERE "molecules"='1.74e14*';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "composition_by_molecule_type" ( "molecule" text, "percent_of_mass" text, "mol_weight_daltons" text, "molecules" text, "percent_of_molecules" text ); Question: what is the percent of mass when the mol.weight (daltons) is 1e11? <|assistant|> SELECT "percent_of_mass" FROM "composition_by_molecule_type" WHERE "mol_weight_daltons"='1e11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "top_attendances" ( "rank" real, "round" text, "home_team" text, "away_team" text, "result" text, "location" text, "attendance" real ); Question: How many people attended the game when the away team was dynamo kyiv, and a Home team of torpedo zaporizhia? <|assistant|> SELECT "attendance" FROM "top_attendances" WHERE "away_team"='dynamo kyiv' AND "home_team"='torpedo zaporizhia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "top_attendances" ( "rank" real, "round" text, "home_team" text, "away_team" text, "result" text, "location" text, "attendance" real ); Question: What was the round when the home team was chornomorets odessa? <|assistant|> SELECT "round" FROM "top_attendances" WHERE "home_team"='chornomorets odessa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "top_attendances" ( "rank" real, "round" text, "home_team" text, "away_team" text, "result" text, "location" text, "attendance" real ); Question: What is the rank when the game was at dnipro stadium , kremenchuk? <|assistant|> SELECT "rank" FROM "top_attendances" WHERE "location"='dnipro stadium , kremenchuk';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_results" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What are the lowest points for the engines of the Lamborghini v12 and the Chassis on Minardi m191b? <|assistant|> SELECT MIN("points") FROM "complete_formula_one_results" WHERE "engine"='lamborghini v12' AND "chassis"='minardi m191b';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_results" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the Chassis from before 1997 with a Lamborghini v12 engine? <|assistant|> SELECT "chassis" FROM "complete_formula_one_results" WHERE "year"<1997 AND "engine"='lamborghini v12';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_results" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What is the total of the year with a point larger than 0 or the Chassis of Minardi m190? <|assistant|> SELECT SUM("year") FROM "complete_formula_one_results" WHERE "chassis"='minardi m190' AND "points">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_results" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What are the lowest points from 1992 with a Chassis of Minardi m192? <|assistant|> SELECT MIN("points") FROM "complete_formula_one_results" WHERE "year"=1992 AND "chassis"='minardi m192';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_formula_one_results" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); Question: What Entrant has 0 points and from 1997? <|assistant|> SELECT "entrant" FROM "complete_formula_one_results" WHERE "points"=0 AND "year"=1997;<|endoftext|>