text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_fina_diving_world_series" (
"year" real,
"1st_venue" text,
"2nd_venue" text,
"3rd_venue" text,
"4th_venue" text,
"5th_venue" text
);
Question: In 2010, how many 1st venue cities were there?
<|assistant|>
SELECT COUNT("1st_venue") FROM "list_of_fina_diving_world_series" WHERE "year"=2010;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_fina_diving_world_series" (
"year" real,
"1st_venue" text,
"2nd_venue" text,
"3rd_venue" text,
"4th_venue" text,
"5th_venue" text
);
Question: When Qingdao was the 1st venue city, who was in the 2nd venue?
<|assistant|>
SELECT "2nd_venue" FROM "list_of_fina_diving_world_series" WHERE "1st_venue"='Qingdao';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_fina_diving_world_series" (
"year" real,
"1st_venue" text,
"2nd_venue" text,
"3rd_venue" text,
"4th_venue" text,
"5th_venue" text
);
Question: What city was in the 3rd venue when Mexico City was in the 2nd?
<|assistant|>
SELECT "3rd_venue" FROM "list_of_fina_diving_world_series" WHERE "2nd_venue"='Mexico City';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_224840_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: How many seats became avaliable in Massachusetts 3rd district?
<|assistant|>
SELECT COUNT("vacator") FROM "table1_224840_4" WHERE "district"='Massachusetts 3rd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_224840_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Who left office on November 26, 1800?
<|assistant|>
SELECT "vacator" FROM "table1_224840_4" WHERE "date_successor_seated"='November 26, 1800';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_224840_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Who was the latest to take office in Massachusetts 3rd district?
<|assistant|>
SELECT "successor" FROM "table1_224840_4" WHERE "district"='Massachusetts 3rd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "collection" (
"date" text,
"builder" text,
"type" text,
"operator" text,
"number" text,
"withdrawn" text,
"status" text
);
Question: List the builder from 1930.
<|assistant|>
SELECT "builder" FROM "collection" WHERE "date"='1930';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "collection" (
"date" text,
"builder" text,
"type" text,
"operator" text,
"number" text,
"withdrawn" text,
"status" text
);
Question: List the number of builders where the withdrawn is 1951 and number is 42.
<|assistant|>
SELECT COUNT("builder") FROM "collection" WHERE "withdrawn"='1951' AND "number"='42';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "collection" (
"date" text,
"builder" text,
"type" text,
"operator" text,
"number" text,
"withdrawn" text,
"status" text
);
Question: List the date for number 1.
<|assistant|>
SELECT "date" FROM "collection" WHERE "number"='1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "collection" (
"date" text,
"builder" text,
"type" text,
"operator" text,
"number" text,
"withdrawn" text,
"status" text
);
Question: List the number for the operator melbourne and metropolitan tramways board.
<|assistant|>
SELECT "number" FROM "collection" WHERE "operator"='Melbourne and Metropolitan Tramways Board';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "collection" (
"date" text,
"builder" text,
"type" text,
"operator" text,
"number" text,
"withdrawn" text,
"status" text
);
Question: List the status for the operator Toronto transit commission.
<|assistant|>
SELECT "status" FROM "collection" WHERE "operator"='Toronto Transit Commission';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "american_television" (
"year" text,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text,
"studio_host" text,
"studio_analysts" text
);
Question: Which network has bob costas as the studio host and darren pang as the ice level reporters?
<|assistant|>
SELECT "network" FROM "american_television" WHERE "studio_host"='Bob Costas' AND "ice_level_reporters"='Darren Pang';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "american_television" (
"year" text,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text,
"studio_host" text,
"studio_analysts" text
);
Question: Which play-by-play has mike milbury as the studio analyst and darren pang as the ice level reporters?
<|assistant|>
SELECT "play_by_play" FROM "american_television" WHERE "studio_analysts"='Mike Milbury' AND "ice_level_reporters"='Darren Pang';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "american_television" (
"year" text,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text,
"studio_host" text,
"studio_analysts" text
);
Question: Who is the color commentator when brian engblom is ice level reporters?
<|assistant|>
SELECT "color_commentator_s" FROM "american_television" WHERE "ice_level_reporters"='Brian Engblom';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "american_television" (
"year" text,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text,
"studio_host" text,
"studio_analysts" text
);
Question: Who is the play-by-play when nbc is the network and darren pang is the ice level reporters?
<|assistant|>
SELECT "play_by_play" FROM "american_television" WHERE "network"='NBC' AND "ice_level_reporters"='Darren Pang';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "american_television" (
"year" text,
"network" text,
"play_by_play" text,
"color_commentator_s" text,
"ice_level_reporters" text,
"studio_host" text,
"studio_analysts" text
);
Question: Who is the studio host for the year 2010?
<|assistant|>
SELECT "studio_host" FROM "american_television" WHERE "year"='2010';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_224844_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Who left a seat open for the district of connecticut at-large
<|assistant|>
SELECT "vacator" FROM "table1_224844_4" WHERE "district"='Connecticut At-large';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_224844_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Why was a seat left open fo Connecticut at-large?
<|assistant|>
SELECT "reason_for_change" FROM "table1_224844_4" WHERE "district"='Connecticut At-large';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_4" (
"rank_mid_east" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: What is the smallest Asian rank?
<|assistant|>
SELECT MIN("rank_asia") FROM "table1_2248784_4";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_4" (
"rank_mid_east" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: What 2011 GDP (PPP) billions of USD does Iraq have?
<|assistant|>
SELECT "2011_gdp_ppp_billions_of_usd" FROM "table1_2248784_4" WHERE "country"='Iraq';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_4" (
"rank_mid_east" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: What 2011 GDP (PPP) billions of USD does Israel have?
<|assistant|>
SELECT "2011_gdp_ppp_billions_of_usd" FROM "table1_2248784_4" WHERE "country"='Israel';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_4" (
"rank_mid_east" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: How many asian rank have 1 as a mideast rank?
<|assistant|>
SELECT COUNT("rank_asia") FROM "table1_2248784_4" WHERE "rank_mid_east"=1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_african_countries_by_gdp_per_cap" (
"gdp_ppp_per_capita_2010_african_world_rank_2010" text,
"nation" text,
"gdp_by_agriculture_2010" text,
"gdp_by_industry_2010" text,
"gdp_by_services_2010" text,
"total_gdp_ppp_2010_african_world_rank_2010" text,
"gdp_real_growth_rate_2010" text
);
Question: Gdp per capita for malawi
<|assistant|>
SELECT "gdp_ppp_per_capita_2010_african_world_rank_2010" FROM "list_of_african_countries_by_gdp_per_cap" WHERE "nation"='Malawi';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_asian_countries_by_gdp_per_capit" (
"asian_rank" real,
"world_rank" real,
"country" text,
"gdp_per_capita" text,
"gdp_world_rank" text
);
Question: Name the gdp world rank for asian rank being 15
<|assistant|>
SELECT "gdp_world_rank" FROM "list_of_asian_countries_by_gdp_per_capit" WHERE "asian_rank"=15;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_asian_countries_by_gdp_per_capit" (
"asian_rank" real,
"world_rank" real,
"country" text,
"gdp_per_capita" text,
"gdp_world_rank" text
);
Question: Name the gdp per capita for world rank being 131
<|assistant|>
SELECT "gdp_per_capita" FROM "list_of_asian_countries_by_gdp_per_capit" WHERE "gdp_world_rank"='131';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_asian_countries_by_gdp_per_capit" (
"asian_rank" real,
"world_rank" real,
"country" text,
"gdp_per_capita" text,
"gdp_world_rank" text
);
Question: Name the gdp world rank for asian rank being 20
<|assistant|>
SELECT "gdp_world_rank" FROM "list_of_asian_countries_by_gdp_per_capit" WHERE "asian_rank"=20;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_asian_countries_by_gdp_per_capit" (
"asian_rank" real,
"world_rank" real,
"country" text,
"gdp_per_capita" text,
"gdp_world_rank" text
);
Question: Name the most world rank for asian rank being 31
<|assistant|>
SELECT MAX("world_rank") FROM "list_of_asian_countries_by_gdp_per_capit" WHERE "asian_rank"=31;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_3" (
"rank_subcontinent" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: Name the least rank subcontinent for bangladesh
<|assistant|>
SELECT MIN("rank_subcontinent") FROM "table1_2248784_3" WHERE "country"='Bangladesh';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_3" (
"rank_subcontinent" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: Name the rank world for 7 rank subcontinent
<|assistant|>
SELECT "rank_world" FROM "table1_2248784_3" WHERE "rank_subcontinent"=7;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_3" (
"rank_subcontinent" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: Name the 2011 gdp for pakistan
<|assistant|>
SELECT "2011_gdp_ppp_billions_of_usd" FROM "table1_2248784_3" WHERE "country"='Pakistan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_3" (
"rank_subcontinent" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: Name the 2011 gdp for 65 rank world
<|assistant|>
SELECT "2011_gdp_ppp_billions_of_usd" FROM "table1_2248784_3" WHERE "rank_world"=65;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_2248784_3" (
"rank_subcontinent" real,
"rank_asia" real,
"rank_world" real,
"country" text,
"2011_gdp_ppp_billions_of_usd" text
);
Question: Name the number of rank world for bhutan
<|assistant|>
SELECT COUNT("rank_world") FROM "table1_2248784_3" WHERE "country"='Bhutan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_african_countries_by_gdp_per_cap" (
"african_rank" real,
"world_rank" real,
"nation" text,
"gdp_per_capita" text,
"total_gdp_world_rank" real
);
Question: How many items were listed under world rank under the nation of Nigeria?
<|assistant|>
SELECT COUNT("world_rank") FROM "list_of_african_countries_by_gdp_per_cap" WHERE "nation"='Nigeria';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_african_countries_by_gdp_per_cap" (
"african_rank" real,
"world_rank" real,
"nation" text,
"gdp_per_capita" text,
"total_gdp_world_rank" real
);
Question: How many items are listed under gdp per capita under the nation of Burkina Faso?
<|assistant|>
SELECT COUNT("gdp_per_capita") FROM "list_of_african_countries_by_gdp_per_cap" WHERE "nation"='Burkina Faso';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_african_countries_by_gdp_per_cap" (
"african_rank" real,
"world_rank" real,
"nation" text,
"gdp_per_capita" text,
"total_gdp_world_rank" real
);
Question: What is the total gdp world rank when the gdp per capita was listed at $1,163?
<|assistant|>
SELECT MIN("total_gdp_world_rank") FROM "list_of_african_countries_by_gdp_per_cap" WHERE "gdp_per_capita"='$1,163';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_country_by_historical_gdp_ppp_pe" (
"south_american_rank" real,
"world_rank" real,
"nation" text,
"2011_imf" text,
"2008_cia_factbook" text
);
Question: Name the least world rank for south american rank 3
<|assistant|>
SELECT MIN("world_rank") FROM "list_of_country_by_historical_gdp_ppp_pe" WHERE "south_american_rank"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "list_of_country_by_historical_gdp_ppp_pe" (
"south_american_rank" real,
"world_rank" real,
"nation" text,
"2011_imf" text,
"2008_cia_factbook" text
);
Question: Name the south american rank for venezuela
<|assistant|>
SELECT MIN("south_american_rank") FROM "list_of_country_by_historical_gdp_ppp_pe" WHERE "nation"='Venezuela';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roster" (
"name" text,
"num" real,
"position" text,
"height" text,
"weight" real,
"year" text,
"home_town" text,
"high_school" text
);
Question: How many weight stats are there for players from San Francisco, CA?
<|assistant|>
SELECT COUNT("weight") FROM "roster" WHERE "home_town"='San Francisco, CA';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roster" (
"name" text,
"num" real,
"position" text,
"height" text,
"weight" real,
"year" text,
"home_town" text,
"high_school" text
);
Question: What was rickie winslow's number?
<|assistant|>
SELECT MAX("num") FROM "roster" WHERE "name"='Rickie Winslow';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roster" (
"name" text,
"num" real,
"position" text,
"height" text,
"weight" real,
"year" text,
"home_town" text,
"high_school" text
);
Question: How many height entries are there for players from lagos, nigeria?
<|assistant|>
SELECT COUNT("height") FROM "roster" WHERE "home_town"='Lagos, Nigeria';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roster" (
"name" text,
"num" real,
"position" text,
"height" text,
"weight" real,
"year" text,
"home_town" text,
"high_school" text
);
Question: What is the hometown of the players from alvin high school?
<|assistant|>
SELECT "home_town" FROM "roster" WHERE "high_school"='Alvin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "roster" (
"name" text,
"num" real,
"position" text,
"height" text,
"weight" real,
"year" text,
"home_town" text,
"high_school" text
);
Question: How many height entries are there for players from bayside high school?
<|assistant|>
SELECT COUNT("height") FROM "roster" WHERE "high_school"='Bayside';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225095_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: How many reasons for change were listed when Edward Hempstead was the successor?
<|assistant|>
SELECT COUNT("reason_for_change") FROM "table1_225095_4" WHERE "successor"='Edward Hempstead';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225095_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: How many Vacators were listed when the district was North Carolina 3rd?
<|assistant|>
SELECT COUNT("vacator") FROM "table1_225095_4" WHERE "district"='North Carolina 3rd';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225095_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Who was the vacator when Shadrach Bond was the successor?
<|assistant|>
SELECT "vacator" FROM "table1_225095_4" WHERE "successor"='Shadrach Bond';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225096_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: When was the successor who got his seat because of "until august 2, 1813" seated?
<|assistant|>
SELECT "date_successor_seated" FROM "table1_225096_4" WHERE "reason_for_change"='Until August 2, 1813';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225098_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: The successor for the Massachusetts 20th district was seated on what date?
<|assistant|>
SELECT "date_successor_seated" FROM "table1_225098_4" WHERE "district"='Massachusetts 20th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225098_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Who vacated the Pennsylvania 6th district?
<|assistant|>
SELECT "vacator" FROM "table1_225098_4" WHERE "district"='Pennsylvania 6th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225099_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: Who was the successor for the state of Maine (2) ?
<|assistant|>
SELECT "successor" FROM "table1_225099_3" WHERE "state_class"='Maine (2)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225099_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: What is the date of successors formal installation when the reason for change is resigned december 4, 1819?
<|assistant|>
SELECT "date_of_successors_formal_installation" FROM "table1_225099_3" WHERE "reason_for_change"='Resigned December 4, 1819';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225099_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: How many entries are shown for date of successors formal installation where successor is john w. walker (dr)?
<|assistant|>
SELECT COUNT("date_of_successors_formal_installation") FROM "table1_225099_3" WHERE "successor"='John W. Walker (DR)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225099_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: Who was the successor for the state (class) of maine (2)?
<|assistant|>
SELECT "successor" FROM "table1_225099_3" WHERE "state_class"='Maine (2)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225099_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: what is the state for reason for change is resigned may 15, 1820?
<|assistant|>
SELECT "state_class" FROM "table1_225099_3" WHERE "reason_for_change"='Resigned May 15, 1820';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Who is the trophy presentation in the year 1987?
<|assistant|>
SELECT "trophy_presentation" FROM "1980s" WHERE "year"=1987;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Which network has s analyst of eddie arcaro?
<|assistant|>
SELECT "network" FROM "1980s" WHERE "s_analyst"='Eddie Arcaro';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Who are the reporters for the year of 1984?
<|assistant|>
SELECT "reporters" FROM "1980s" WHERE "year"=1984;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: How many trophy presentations where in the year 1987?
<|assistant|>
SELECT COUNT("trophy_presentation") FROM "1980s" WHERE "year"=1987;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: In which year were howard cosell and jack whitaker reporters and s analyst is bill hartack?
<|assistant|>
SELECT MIN("year") FROM "1980s" WHERE "reporters"='Howard Cosell and Jack Whitaker' AND "s_analyst"='Bill Hartack';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1980s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Who is the race caller when jim mckay and al michaels were s hosts in the year 1987?
<|assistant|>
SELECT "race_caller" FROM "1980s" WHERE "s_host"='Jim McKay and Al Michaels' AND "year"=1987;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the host for john rotz and howard cosell
<|assistant|>
SELECT "s_host" FROM "1970s" WHERE "s_analyst"='John Rotz and Howard Cosell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the race caller for jim mckay and howard cosell
<|assistant|>
SELECT "race_caller" FROM "1970s" WHERE "s_host"='Jim McKay' AND "reporters"='Howard Cosell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the race caller for jim mckay and howard cosell and eddie arcaro
<|assistant|>
SELECT "race_caller" FROM "1970s" WHERE "trophy_presentation"='Jim McKay and Howard Cosell' AND "reporters"='Howard Cosell' AND "s_analyst"='Eddie Arcaro';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the reporters for dave johnson for eddie arcaro and howard cosell
<|assistant|>
SELECT "reporters" FROM "1970s" WHERE "race_caller"='Dave Johnson' AND "s_analyst"='Eddie Arcaro and Howard Cosell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the reporters for howard cosell
<|assistant|>
SELECT "reporters" FROM "1970s" WHERE "s_analyst"='Howard Cosell';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1970s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the number of reporters for heywood hale broun
<|assistant|>
SELECT COUNT("reporters") FROM "1970s" WHERE "s_analyst"='Heywood Hale Broun';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_elevation" (
"num" real,
"district" text,
"province" text,
"region" text,
"ubigeo" real,
"elevation_m" real
);
Question: Which province has an elevation of 4550?
<|assistant|>
SELECT "province" FROM "by_elevation" WHERE "elevation_m"=4550;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_elevation" (
"num" real,
"district" text,
"province" text,
"region" text,
"ubigeo" real,
"elevation_m" real
);
Question: Which province is in the district of San Antonio de Chuca?
<|assistant|>
SELECT "province" FROM "by_elevation" WHERE "district"='San Antonio de Chuca';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_elevation" (
"num" real,
"district" text,
"province" text,
"region" text,
"ubigeo" real,
"elevation_m" real
);
Question: How many elevations are listed for Paratia?
<|assistant|>
SELECT COUNT("elevation_m") FROM "by_elevation" WHERE "district"='Paratia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_elevation" (
"num" real,
"district" text,
"province" text,
"region" text,
"ubigeo" real,
"elevation_m" real
);
Question: What province is in the district of Condoroma?
<|assistant|>
SELECT "province" FROM "by_elevation" WHERE "district"='Condoroma';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the reporters for 2003
<|assistant|>
SELECT "reporters" FROM "2000s" WHERE "year"=2003;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Name the total number for race caller for bob costas and charlsie cantey
<|assistant|>
SELECT COUNT("race_caller") FROM "2000s" WHERE "trophy_presentation"='Bob Costas and Charlsie Cantey';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: Who is the race caller for the year 1994?
<|assistant|>
SELECT "race_caller" FROM "1990s" WHERE "year"=1994;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1990s" (
"year" real,
"network" text,
"race_caller" text,
"s_host" text,
"s_analyst" text,
"reporters" text,
"trophy_presentation" text
);
Question: How many reporters for the year 1993?
<|assistant|>
SELECT COUNT("reporters") FROM "1990s" WHERE "year"=1993;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_field" (
"post" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"opening_odds" text,
"starting_odds" text,
"finishing_pos" real
);
Question: What were the starting odds for the opening odds of 2-1?
<|assistant|>
SELECT "starting_odds" FROM "the_field" WHERE "opening_odds"='2-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_field" (
"post" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"opening_odds" text,
"starting_odds" text,
"finishing_pos" real
);
Question: Who was the jockey with opening odds of 4-1?
<|assistant|>
SELECT "jockey" FROM "the_field" WHERE "opening_odds"='4-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_field" (
"post" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"opening_odds" text,
"starting_odds" text,
"finishing_pos" real
);
Question: HOw many jockeys had eoin harty as a trainer
<|assistant|>
SELECT COUNT("jockey") FROM "the_field" WHERE "trainer"='Eoin Harty';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "the_field" (
"post" real,
"horse_name" text,
"trainer" text,
"jockey" text,
"opening_odds" text,
"starting_odds" text,
"finishing_pos" real
);
Question: Which post had the horse named chocolate candy?
<|assistant|>
SELECT "post" FROM "the_field" WHERE "horse_name"='Chocolate Candy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225199_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: What is every date successor seated for the Virginia 11th District?
<|assistant|>
SELECT "date_successor_seated" FROM "table1_225199_4" WHERE "district"='Virginia 11th';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225200_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Name the successor for not filled this congress
<|assistant|>
SELECT "successor" FROM "table1_225200_4" WHERE "date_successor_seated"='Not filled this congress';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225200_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Name the district for rep. warren r. davis died during previous congress
<|assistant|>
SELECT "district" FROM "table1_225200_4" WHERE "reason_for_change"='Rep. Warren R. Davis died during previous congress';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225200_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Name the total number of reason for change for not filled this congress
<|assistant|>
SELECT COUNT("reason_for_change") FROM "table1_225200_4" WHERE "date_successor_seated"='Not filled this congress';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225200_4" (
"district" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_successor_seated" text
);
Question: Name the vacator for resigned february 26, 1836 because of ill health
<|assistant|>
SELECT "vacator" FROM "table1_225200_4" WHERE "reason_for_change"='Resigned February 26, 1836 because of ill health';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225205_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: Name the vacator for failure to elect
<|assistant|>
SELECT "vacator" FROM "table1_225205_3" WHERE "reason_for_change"='Failure to elect';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225205_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: Name the state class for iowa admitted to the union december 28, 1846
<|assistant|>
SELECT "state_class" FROM "table1_225205_3" WHERE "reason_for_change"='Iowa admitted to the Union December 28, 1846';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_225206_3" (
"state_class" text,
"vacator" text,
"reason_for_change" text,
"successor" text,
"date_of_successors_formal_installation" text
);
Question: Who was the vacator when the reason for change was failure to elect?
<|assistant|>
SELECT "vacator" FROM "table1_225206_3" WHERE "reason_for_change"='Failure to elect';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"c_g" real,
"total_apps" real,
"total_g" real
);
Question: Name the number of nat for total g of 6
<|assistant|>
SELECT COUNT("nat") FROM "squad_stats" WHERE "total_g"=6;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"c_g" real,
"total_apps" real,
"total_g" real
);
Question: Name the l g for rubio
<|assistant|>
SELECT "l_g" FROM "squad_stats" WHERE "player"='Rubio';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"c_g" real,
"total_apps" real,
"total_g" real
);
Question: Name the least total apaps for txema
<|assistant|>
SELECT MIN("total_apps") FROM "squad_stats" WHERE "player"='Txema';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview_of_the_regions" (
"num" real,
"name" text,
"name_english" text,
"population_2008_07_01" real,
"area_km" real,
"pop_km" text,
"iso_3166_2" text,
"administrative_centre" text
);
Question: when administrative centre is egilsstaðir, what is the pop./ km²?
<|assistant|>
SELECT COUNT("pop_km") FROM "overview_of_the_regions" WHERE "administrative_centre"='Egilsstaðir';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview_of_the_regions" (
"num" real,
"name" text,
"name_english" text,
"population_2008_07_01" real,
"area_km" real,
"pop_km" text,
"iso_3166_2" text,
"administrative_centre" text
);
Question: when the name is southern region, what is the administrative centre?
<|assistant|>
SELECT "administrative_centre" FROM "overview_of_the_regions" WHERE "name_english"='Southern Region';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview_of_the_regions" (
"num" real,
"name" text,
"name_english" text,
"population_2008_07_01" real,
"area_km" real,
"pop_km" text,
"iso_3166_2" text,
"administrative_centre" text
);
Question: when the area (km²) is 22721, what is the pop./ km²?
<|assistant|>
SELECT "pop_km" FROM "overview_of_the_regions" WHERE "area_km"=22721;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview_of_the_regions" (
"num" real,
"name" text,
"name_english" text,
"population_2008_07_01" real,
"area_km" real,
"pop_km" text,
"iso_3166_2" text,
"administrative_centre" text
);
Question: What is the max pop of 2008 for selfoss?
<|assistant|>
SELECT MAX("population_2008_07_01") FROM "overview_of_the_regions" WHERE "administrative_centre"='Selfoss';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "overview_of_the_regions" (
"num" real,
"name" text,
"name_english" text,
"population_2008_07_01" real,
"area_km" real,
"pop_km" text,
"iso_3166_2" text,
"administrative_centre" text
);
Question: When the # is 4, what is the pop./ km²?
<|assistant|>
SELECT "pop_km" FROM "overview_of_the_regions" WHERE "num"=4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"c_g" real,
"total_apps" real,
"total_g" real
);
Question: Name the player for l apps for 17
<|assistant|>
SELECT "player" FROM "squad_stats" WHERE "l_apps"=17;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"c_g" real,
"total_apps" real,
"total_g" real
);
Question: Name the least total apps for jaime
<|assistant|>
SELECT MIN("total_apps") FROM "squad_stats" WHERE "player"='Jaime';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "squad_stats" (
"player" text,
"nat" text,
"pos" text,
"l_apps" real,
"l_g" real,
"c_apps" real,
"c_g" real,
"total_apps" real,
"total_g" real
);
Question: Name the total number of lg for cg is larger than 1.0 for c apps is 3
<|assistant|>
SELECT COUNT("l_g") FROM "squad_stats" WHERE "c_g">1.0 AND "c_apps"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_22577693_1" (
"details" text,
"host_nation_s" text,
"final_venue" text,
"winner" text,
"result" text,
"runner_up" text
);
Question: If the runner-up is [[|]] 151/8 (50.0 overs), what were the results?
<|assistant|>
SELECT "result" FROM "table1_22577693_1" WHERE "runner_up"='[[|]] 151/8 (50.0 overs)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_22577693_1" (
"details" text,
"host_nation_s" text,
"final_venue" text,
"winner" text,
"result" text,
"runner_up" text
);
Question: What is the name of the host nations if the winner was Hong Kong 207/6 (47.1 overs)?
<|assistant|>
SELECT "host_nation_s" FROM "table1_22577693_1" WHERE "winner"='Hong Kong 207/6 (47.1 overs)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_22577693_1" (
"details" text,
"host_nation_s" text,
"final_venue" text,
"winner" text,
"result" text,
"runner_up" text
);
Question: If the winner is Hong Kong 207/6 (47.1 overs), what is the name of the hosting nation?
<|assistant|>
SELECT "host_nation_s" FROM "table1_22577693_1" WHERE "winner"='Hong Kong 207/6 (47.1 overs)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_22577693_1" (
"details" text,
"host_nation_s" text,
"final_venue" text,
"winner" text,
"result" text,
"runner_up" text
);
Question: If the results are Kuwait won by 72 runs scorecard, what are the details?
<|assistant|>
SELECT "details" FROM "table1_22577693_1" WHERE "result"='Kuwait won by 72 runs Scorecard';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.