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