id int64 0 9.43k | db_id stringclasses 69
values | schema stringclasses 69
values | question stringlengths 24 325 | output stringlengths 23 804 | evidence stringlengths 0 673 | filtered_schema listlengths 0 16 |
|---|---|---|---|---|---|---|
5,100 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What are the precise locations of the cities with an area code of 787? | SELECT T2.latitude, T2.longitude FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = '787' GROUP BY T2.latitude, T2.longitude | precise location refers to latitude, longitude | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.latitude",
"zip_data.longitude",
"zip_data.zip_code"
] |
5,101 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | In California, how many delivery receptacles are there in the community post office that has the highest number of delivery receptacles? | SELECT COUNT(*) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.abbreviation = 'CA' AND T2.type LIKE '%Community Post Office%' AND T1.name = 'California' AND T2.state = 'CA' | in California refers to name = 'California' and state = 'CA'; 'Community Post Office' is the Type | [
"state.abbreviation",
"state.name",
"zip_data.state",
"zip_data.type"
] |
5,102 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | In which county can you find the city with the highest number of females? | SELECT T4.county FROM zip_data AS T3 INNER JOIN country AS T4 ON T3.zip_code = T4.zip_code GROUP BY T4.county ORDER BY T3.female_population DESC LIMIT 1 | highest number of females refers to Max(female_population) | [
"country.county",
"country.zip_code",
"zip_data.female_population",
"zip_data.zip_code"
] |
5,103 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What are the names of the states whose postal point is not affiliated with any organization? | SELECT DISTINCT T2.name FROM zip_data AS T1 INNER JOIN state AS T2 ON T1.state = T2.abbreviation WHERE T1.division IS NULL | postal point is not affiliated with any organization refers to division is null | [
"state.abbreviation",
"state.name",
"zip_data.division",
"zip_data.state"
] |
5,104 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the difference in the most populated city of Allentown-Bethlehem-Easton, PA-NJ in 2020 against its population in 2010? | SELECT T1.population_2020 - T1.population_2010 AS result_data FROM zip_data AS T1 INNER JOIN CBSA AS T2 ON T1.CBSA = T2.CBSA WHERE T2.CBSA_name = 'Allentown-Bethlehem-Easton, PA-NJ' ORDER BY T1.population_2020 DESC LIMIT 1 | "Allentown-Bethlehem-Easton, PA-NJ" is the CBSA_name; most populated city refers to Max(population_2020); difference = Subtract (population_2020, population_2011) | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.population_2010",
"zip_data.population_2020"
] |
5,105 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List all the zip codes in the county of New Castle in Delaware. | SELECT DISTINCT T2.zip_code FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T2.county = 'NEW CASTLE' AND T1.name = 'Delaware' | "NEW CASTLE" is the county; 'Delaware' is the name of state | [
"country.county",
"country.state",
"country.zip_code",
"state.abbreviation",
"state.name"
] |
5,106 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | How many representatives are there in the state with the highest monthly benefit payments for retired workers? | SELECT COUNT(T3.cognress_rep_id) FROM zip_data AS T1 INNER JOIN state AS T2 ON T1.state = T2.abbreviation INNER JOIN congress AS T3 ON T2.abbreviation = T3.abbreviation ORDER BY T1.monthly_benefits_retired_workers DESC LIMIT 1 | state with highest monthly benefits payment for retired workers refers to Max(monthly_benefits_retired_workers) | [
"congress.abbreviation",
"congress.cognress_rep_id",
"state.abbreviation",
"zip_data.monthly_benefits_retired_workers",
"zip_data.state"
] |
5,107 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | In the state where Lisa Murkowski is the representative, how many cities have zero employees? | SELECT COUNT(T3.city) FROM congress AS T1 INNER JOIN state AS T2 ON T1.abbreviation = T2.abbreviation INNER JOIN zip_data AS T3 ON T2.abbreviation = T3.state WHERE T1.first_name = 'Murkowski' AND T1.last_name = 'Lisa' AND T3.employees = 0 | zero employee refers to employees = 0 | [
"congress.abbreviation",
"congress.first_name",
"congress.last_name",
"state.abbreviation",
"zip_data.city",
"zip_data.employees",
"zip_data.state"
] |
5,108 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What are the top 3 states with the highest Asian population? List the full names of all the representatives in the said states. | SELECT t.state, T1.first_name, T1.last_name FROM zip_data AS T INNER JOIN congress AS T1 ON t.state = T1.abbreviation GROUP BY t.state ORDER BY SUM(t.asian_population) DESC LIMIT 3 | city with highest asian population refers to Max(Sum(asian_population)); full name refers to first_name, last_name | [
"congress.abbreviation",
"congress.first_name",
"congress.last_name",
"t.asian_population",
"t.state"
] |
5,109 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which state is Outagamie County in? Give the full name of the state. | SELECT DISTINCT T2.name FROM country AS T1 INNER JOIN state AS T2 ON T1.state = T2.abbreviation WHERE T1.county = 'OUTAGAMIE' | "OUTAGAMIE" is the county | [
"country.county",
"country.state",
"state.abbreviation",
"state.name"
] |
5,110 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What party does the area with the zip code 91701 belong to? | SELECT T1.party FROM congress AS T1 INNER JOIN state AS T2 ON T1.abbreviation = T2.abbreviation INNER JOIN zip_data AS T3 ON T2.abbreviation = T3.state WHERE T3.zip_code = 91701 GROUP BY T1.party | [
"congress.abbreviation",
"congress.party",
"state.abbreviation",
"zip_data.state",
"zip_data.zip_code"
] | |
5,111 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | How many males are there in New Haven County's residential areas? | SELECT SUM(T1.male_population) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'NEW HAVEN' | "NEW HAVEN" is the county; male refers to male_population | [
"country.county",
"country.zip_code",
"zip_data.male_population",
"zip_data.zip_code"
] |
5,112 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Show the alias for the county at coordinate (18.090875, -66.867756). | SELECT T2.alias FROM zip_data AS T1 INNER JOIN alias AS T2 ON T1.zip_code = T2.zip_code WHERE T1.latitude = 18.090875 AND T1.longitude = -66.867756 | coordinates refers to latitude, longitude; latitude = '18.090875; longitude = '-66.867756' | [
"alias.alias",
"alias.zip_code",
"zip_data.latitude",
"zip_data.longitude",
"zip_data.zip_code"
] |
5,113 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | For the city with the most elders, what's its area code? | SELECT T2.area_code FROM zip_data AS T1 INNER JOIN area_code AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.area_code ORDER BY T1.over_65 DESC LIMIT 1 | city with most elders refers to Max(over_65) | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.over_65",
"zip_data.zip_code"
] |
5,114 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | For the county represented by Thompson Bennie G, how many bad aliases does it have? | SELECT COUNT(DISTINCT T2.bad_alias) FROM zip_congress AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T1.district = T3.cognress_rep_id WHERE T3.first_name = 'Thompson' AND T3.last_name = 'Bennie G' | [
"avoid.bad_alias",
"avoid.zip_code",
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code"
] | |
5,115 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Give the location coordinates of the city with area code 636. | SELECT T2.latitude, T2.longitude FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 636 | location coordinate refers to (latitude, longitude) | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.latitude",
"zip_data.longitude",
"zip_data.zip_code"
] |
5,116 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Show the zip code of the county represented by Buchanan Vernon. | SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.first_name = 'Buchanan' AND T1.last_name = 'Vernon' | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code"
] | |
5,117 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which state is area code 878 in? Give the name of the state. | SELECT T2.state FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 878 | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.state",
"zip_data.zip_code"
] | |
5,118 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | How many counties are there in Virginia State? | SELECT COUNT(T2.county) FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Virginia' | "Virginia" is the state | [
"country.county",
"country.state",
"state.abbreviation",
"state.name"
] |
5,119 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Give the name and the position of the cbsa officer from the area with the zip code 45503. | SELECT T1.CBSA_name, T2.latitude, T2.longitude FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.zip_code = 45503 GROUP BY T1.CBSA_name, T2.latitude, T2.longitude | position refers to latitude, longitude | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.latitude",
"zip_data.longitude",
"zip_data.zip_code"
] |
5,120 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Tell the name of the county which is represented by Hartzler Vicky. | SELECT T1.county FROM country AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Hartzler' AND T3.last_name = 'Vicky' GROUP BY T1.county | name of county refers to county | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"country.county",
"country.zip_code",
"zip_congress.district",
"zip_congress.zip_code"
] |
5,121 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Calculate the average male median age of all the residential areas in Windham county. | SELECT SUM(T2.male_median_age) / COUNT(T2.median_age) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'WINDHAM' | average male median age refers to Divide (Sum(male_median_age), Count(county)); 'WINDHAM' is the county | [
"country.county",
"country.zip_code",
"zip_data.male_median_age",
"zip_data.median_age",
"zip_data.zip_code"
] |
5,122 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | For the county where DeSantis Ron is from, what is the average female median age? | SELECT SUM(T4.female_median_age) / COUNT(T1.county) FROM country AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id INNER JOIN zip_data AS T4 ON T1.zip_code = T4.zip_code WHERE T3.first_name = 'DeSantis' AND T3.last_name = 'Ron' | average female median age refers to Divide (Sum(female_median_age), Count(county)) | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"country.county",
"country.zip_code",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.female_median_age",
"zip_data.zip_code"
] |
5,123 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the area code of Bishopville, SC? | SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Bishopville' AND T2.state = 'SC' | "Bishopville" is the city; 'SC' is the state | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.city",
"zip_data.state",
"zip_data.zip_code"
] |
5,124 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Name the bad alias of Geneva, AL. | SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Geneva' AND T2.state = 'AL' | "Geneva" is the city; 'AL' is the state | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.city",
"zip_data.state",
"zip_data.zip_code"
] |
5,125 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which city and state has the bad alias of Lawrenceville? | SELECT T2.city, T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Lawrenceville' GROUP BY T2.city, T2.state | "Lawrenceville" is the bad_alias | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.city",
"zip_data.state",
"zip_data.zip_code"
] |
5,126 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Name both the alias and the bad alias of zip code 38015. | SELECT T1.alias, T2.bad_alias FROM alias AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 38015 | [
"alias.alias",
"alias.zip_code",
"avoid.bad_alias",
"avoid.zip_code"
] | |
5,127 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the zip code of the district represented by Steven A King? | SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.first_name = 'King' AND T1.last_name = 'Steven A' | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code"
] | |
5,128 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the CBSA name and type in York, ME? | SELECT T1.CBSA_name, T1.CBSA_type FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'York' AND T2.state = 'ME' | "York" is the city; 'ME' is the state; type refers to CBSA_type | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"CBSA.CBSA_type",
"zip_data.CBSA",
"zip_data.city",
"zip_data.state"
] |
5,129 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List 10 cities with a median age over 40. Include their zip codes and area codes. | SELECT T2.city, T2.zip_code, T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.median_age >= 40 LIMIT 10 | median age over 40 refers to median_age > 40 | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.city",
"zip_data.median_age",
"zip_data.zip_code"
] |
5,130 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Name the county that has the bad alias of Druid Hills. | SELECT T2.county FROM avoid AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Druid Hills' | "Druid Hills" is the bad_alias | [
"avoid.bad_alias",
"avoid.zip_code",
"country.county",
"country.zip_code"
] |
5,131 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the area code of Phillips county in Montana? | SELECT DISTINCT T1.area_code FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code INNER JOIN state AS T3 ON T2.state = T3.abbreviation WHERE T2.county = 'PHILLIPS' AND T3.name = 'Montana' | "PHILLIPS" is the county; 'Montana' is the name of state | [
"area_code.area_code",
"area_code.zip_code",
"country.county",
"country.state",
"country.zip_code",
"state.abbreviation",
"state.name"
] |
5,132 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which district has the largest land area in Wisconsin? Write the full name of the congress representative and include the postal codes. | SELECT T2.zip_code, T1.first_name, T1.last_name FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state = 'Wisconsin' ORDER BY T1.land_area DESC LIMIT 1 | "Wisconsin" is the state; largest land area refers to Max(land_area); full name refers to first_name, last_name; postal code refers to zip_code | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.land_area",
"congress.last_name",
"congress.state",
"zip_congress.district",
"zip_congress.zip_code"
] |
5,133 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | How many states are in the central time zone? Write their full names. | SELECT SUM(CASE WHEN T1.time_zone = 'Central' THEN 1 ELSE 0 END) AS count FROM zip_data AS T1 INNER JOIN state AS T2 ON T2.abbreviation = T1.state WHERE T1.time_zone = 'Central' | central time zone refers to time_zone = 'Central' | [
"state.abbreviation",
"zip_data.state",
"zip_data.time_zone"
] |
5,134 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Name 10 cities with their states that are under the Lexington-Fayette, KY office of the Canada Border Services Agency. | SELECT DISTINCT T2.city, T2.state FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Lexington-Fayette, KY' LIMIT 10 | "Lexington-Fayette, KY" is the CBSA_name | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.city",
"zip_data.state"
] |
5,135 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the percentage ratio between Democrats and Republicans in Indiana? List the zip codes belonging to Democrats. | SELECT CAST(COUNT(CASE WHEN T2.party = 'Democrat' THEN 1 ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.party = 'Republican' THEN 1 ELSE NULL END)FROM zip_congress AS T1 INNER JOIN congress AS T2 ON T2.cognress_rep_id = T1.district | "Democrats" and "Republicans" refers to party = 'Democrat" and party = 'Republican'; percentage ratio = Multiply (Divide (Count(party = 'Democrat"), Count(party = 'Republican')), 100) | [
"congress.cognress_rep_id",
"congress.party",
"zip_congress.district"
] |
5,136 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Calculate the ratio between the number of representatives in Alabama and the number of representatives in Illinois. | SELECT CAST(COUNT(CASE WHEN state = 'Alabama' THEN cognress_rep_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN state = 'Illinois' THEN cognress_rep_id ELSE NULL END) FROM congress | "Alabama" and "Illinois" are both state; Ratio = Divide (Count(state = 'Alabama'), Count(state = 'Illinois')) | [
"congress.cognress_rep_id",
"congress.state"
] |
5,137 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Calculate the average of 2020's population in each zip code. | SELECT CAST(SUM(population_2020) AS REAL) / COUNT(zip_code) FROM zip_data | average of 2020 population in each zip code refers to Divide (Sum(population_2020), Count(zip_code)) | [
"zip_data.population_2020",
"zip_data.zip_code"
] |
5,138 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | State the male population for all zip code which were under the Berlin, NH CBSA. | SELECT T2.male_population FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Berlin, NH' GROUP BY T2.male_population | "Berlin, NH" is the CBSA_name | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.male_population"
] |
5,139 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which CBSAs have more than 10 zip codes? | SELECT T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA GROUP BY T1.CBSA HAVING COUNT(T2.zip_code) > 10 | has more than 10 zip codes refers to CBSA where count(CBSA) > 10 | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.zip_code"
] |
5,140 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List all the bad alias for zip codes in Puerto Rico. | SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.state = 'PR' | "Puerto Rico" refers to state = 'PR' | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.state",
"zip_data.zip_code"
] |
5,141 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the longitude and latitude for the district represented by Grayson Alan? | SELECT T1.latitude, T1.longitude FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Grayson' AND T3.last_name = 'Alan' | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.latitude",
"zip_data.longitude",
"zip_data.zip_code"
] | |
5,142 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the state for area code of 787? | SELECT DISTINCT T2.state FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 787 | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.state",
"zip_data.zip_code"
] | |
5,143 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List all representatives of districts which have more than 30 000 population in 2020. | SELECT T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.population_2020 > 30000 GROUP BY T3.first_name, T3.last_name | more than 30000 population in 2020 refers to population_2020 > 30000; representative refers to first_name, last_name | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.population_2020",
"zip_data.zip_code"
] |
5,144 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which zip code in Massachusetts that have more than 1 area code? | SELECT T1.zip_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.state = 'MA' GROUP BY T1.zip_code HAVING COUNT(T1.area_code) > 1 | "Massachusetts" is the state; zip code more than 1 area code refers to Count (zip_code) > 1 | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.state",
"zip_data.zip_code"
] |
5,145 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | State the county for Arecibo City. | SELECT DISTINCT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arecibo' | "Arecibo" is the city | [
"country.county",
"country.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,146 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | How many zip codes are under Barre, VT? | SELECT COUNT(T2.zip_code) FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Barre, VT' | "Barre, VT" is the CBSA_name | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.zip_code"
] |
5,147 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the zip code under Saint Croix county, which zip code has the biggest land area? | SELECT T1.zip_code FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'SAINT CROIX' ORDER BY T2.land_area DESC LIMIT 1 | biggest land area refers to Max(land_area); "SAINT CROIX" is the county | [
"country.county",
"country.zip_code",
"zip_data.land_area",
"zip_data.zip_code"
] |
5,148 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Calculate the difference between the 2020 population and the 2010 population for the districts represented by Griffin Tim. | SELECT T1.population_2020 - T1.population_2010 FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Griffin' AND T3.last_name = 'Tim' | difference = Subtract (population_2020, population_2010) | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.population_2010",
"zip_data.population_2020",
"zip_data.zip_code"
] |
5,149 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Based on the population in 2020, calculate the percentage for the population of Asian in the zip code where the CBSA was Atmore, AL. | SELECT CAST(T2.asian_population AS REAL) * 100 / T2.population_2010 FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Atmore, AL' | "Atmore, AL" is CBSA_name; percentage = Divide(asian_population, population_2020) * 100 | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.asian_population",
"zip_data.population_2010"
] |
5,150 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the cities with an area code 939, which city has the highest Asian population? | SELECT T2.city FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 939 ORDER BY T2.asian_population DESC LIMIT 1 | highest asian population refers to Max(asian_population) | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.asian_population",
"zip_data.city",
"zip_data.zip_code"
] |
5,151 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Give the name of the country and state of the city with elevation of 1039. | SELECT DISTINCT T1.name, T2.state FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T3.elevation = 1039 | elevation of 1039 refers to elevation = 1039 | [
"country.state",
"country.zip_code",
"state.abbreviation",
"state.name",
"zip_data.elevation",
"zip_data.zip_code"
] |
5,152 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the alias and elevation of the city with zip code 1028. | SELECT T1.alias, T2.elevation FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 1028 | [
"alias.alias",
"alias.zip_code",
"zip_data.elevation",
"zip_data.zip_code"
] | |
5,153 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the area code of the city with the largest land area? | SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.land_area = ( SELECT MAX(land_area) FROM zip_data ) | largest land area refers to Max(land_area) | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.land_area",
"zip_data.zip_code"
] |
5,154 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Give the area code of the city with the white population ranging between 1700 to 2000. | SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.white_population BETWEEN 1700 AND 2000 | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.white_population",
"zip_data.zip_code"
] | |
5,155 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the Asian population in the city with the alias Leeds? | SELECT SUM(T2.asian_population) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Leeds' | [
"alias.alias",
"alias.zip_code",
"zip_data.asian_population",
"zip_data.zip_code"
] | |
5,156 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List down the area code and country of the city named Savoy. | SELECT T1.area_code, T2.county FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code INNER JOIN zip_data AS T3 ON T1.zip_code = T3.zip_code WHERE T3.city = 'Savoy' | Savoy is the city; | [
"area_code.area_code",
"area_code.zip_code",
"country.county",
"country.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,157 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What are the alias of the cities with 0 population in 2010? | SELECT DISTINCT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2010 = 0 | with 0 population in 2010 refers to population_2010 = 0; | [
"alias.alias",
"alias.zip_code",
"zip_data.population_2010",
"zip_data.zip_code"
] |
5,158 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the cities with area code 608, how many cities implement daylight savings? | SELECT COUNT(T2.city) FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 608 AND T2.daylight_savings = 'Yes' | implement daylight savings refers to daylight_savings = 'Yes'; | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.city",
"zip_data.daylight_savings",
"zip_data.zip_code"
] |
5,159 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the average elevation of the cities with alias Amherst. | SELECT AVG(T2.elevation) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Amherst' | AVG(elevation) where alias = 'Amherst'; | [
"alias.alias",
"alias.zip_code",
"zip_data.elevation",
"zip_data.zip_code"
] |
5,160 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the country and state of the city named Dalton? | SELECT T2.county FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T3.city = 'Dalton' GROUP BY T2.county | Dalton is the city; | [
"country.county",
"country.state",
"country.zip_code",
"state.abbreviation",
"zip_data.city",
"zip_data.zip_code"
] |
5,161 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Give at least five alias of cities with a postal point of post office. | SELECT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.type = 'Post Office' LIMIT 5 | postal point of post office refers to type = 'Post Office'; | [
"alias.alias",
"alias.zip_code",
"zip_data.type",
"zip_data.zip_code"
] |
5,162 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the difference in the number of cities with P.O. box only and cities with Post Office among the cities with area code 787? | SELECT COUNT(CASE WHEN T2.type = 'P.O. Box Only' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.type = 'Post Office' THEN 1 ELSE NULL END) AS DIFFERENCE FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 787 | SUBTRACT(COUNT(type = 'P.O. Box Only'), COUNT(type = 'Post Office')) where area_code = 787; | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.type",
"zip_data.zip_code"
] |
5,163 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the cities belonging to the country named Arroyo, calculate the percentage of increase in the population in these cities from 2010 to 2020. | SELECT CAST((SUM(T2.population_2020) - SUM(T2.population_2010)) AS REAL) * 100 / SUM(T2.population_2010) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arroyo' | DIVIDE(SUBTRACT(SUM(population_2020)), SUM(population_2010)), SUM(population_2010) as percentage where county = 'ARROYO'; | [
"country.zip_code",
"zip_data.city",
"zip_data.population_2010",
"zip_data.population_2020",
"zip_data.zip_code"
] |
5,164 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the postal points in Texas, provide the zip codes and cities of postal points which have total beneficiaries of above 10000. | SELECT T2.zip_code, T2.city FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Texas' AND T2.total_beneficiaries > 10000 | Texas is the name of the state, in which name = 'Texas'; total beneficiaries of above 10000 refer to total_beneficiaries > 10000; | [
"state.abbreviation",
"state.name",
"zip_data.city",
"zip_data.state",
"zip_data.total_beneficiaries",
"zip_data.zip_code"
] |
5,165 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the postal points in the District of Columbia, how many of them have an area with above 20000 black population? | SELECT COUNT(T1.zip_code) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'DISTRICT OF COLUMBIA' AND T2.black_population > 20000 | District of Columbia refers to county = 'DISTRICT OF COLUMBIA'; postal points refer to zip_code; area with above 20000 black population refers to black_population > 20000; | [
"country.county",
"country.zip_code",
"zip_data.black_population",
"zip_data.zip_code"
] |
5,166 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the city where zip code 19019 is located and the alias of that city. | SELECT T2.city, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 19019 | [
"alias.alias",
"alias.zip_code",
"zip_data.city",
"zip_data.zip_code"
] | |
5,167 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List the bad alias of the postal point located in Camuy. | SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Camuy' | postal points refer to zip_code; Camuy is the city; | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,168 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the zip code, city, and congress representative's full names of the area which has highest population in 2020. | SELECT T1.zip_code, T1.city, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id GROUP BY T2.district ORDER BY T1.population_2020 DESC LIMIT 1 | representative's full names refer to first_name, last_name; area which has highest population in 2020 refers to MAX(population_2020); | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.city",
"zip_data.population_2020",
"zip_data.zip_code"
] |
5,169 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the daylight savings areas in the Midwest region, how many postal points are there in Illinois? | SELECT COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Illinois' AND T2.daylight_savings = 'Yes' AND T2.region = 'Midwest' | postal points refer to zip_code; the daylight savings areas refer to daylight_savings = 'Yes'; Illinois is the name of the state, in which name = 'Illinois'; | [
"state.abbreviation",
"state.name",
"zip_data.daylight_savings",
"zip_data.region",
"zip_data.state",
"zip_data.zip_code"
] |
5,170 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the countries and the zip codes in the Virgin Islands. | SELECT T2.county, T2.zip_code FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Virgin Islands' | the Virgin Islands refer to state where name = 'Virgin Islands'; | [
"country.county",
"country.state",
"country.zip_code",
"state.abbreviation",
"state.name"
] |
5,171 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the zip codes and the alias of Greeneville. | SELECT T2.zip_code, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Greeneville' | Greeneville is the city; | [
"alias.alias",
"alias.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,172 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Compare the numbers of postal points under Smith Adrian and Heck Joe. | SELECT CASE WHEN COUNT(CASE WHEN T1.first_name = 'Smith' AND T1.last_name = 'Adrian' THEN T2.zip_code ELSE NULL END) > COUNT(CASE WHEN T1.first_name = 'Heck' AND T1.last_name = 'Joe' THEN T2.zip_code ELSE NULL END) THEN 'Smith Adrian>Heck Joe' ELSE 'Smith Adrian<=Heck Joe' END AS COMPARE FROM congress AS T1 INNER JOIN ... | COUNT(zip_code where first_name = 'Smith' and last_name = 'Adrian') > COUNT(zip_code where first_name = 'Heck' and last_name = 'Joe'); | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code"
] |
5,173 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the zip codes and CBSA officers of the postal point in Oxford. | SELECT T2.zip_code, T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'Oxford' | CBSA officers refer to CBSA_name; postal point refers to zip_code; Oxford is the city; | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.city",
"zip_data.zip_code"
] |
5,174 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the zip codes and their affiliated organization for the postal point under Kingsport-Bristol, TN-VA. | SELECT T2.zip_code, T2.organization FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Kingsport-Bristol, TN-VA' | postal point under Kingsport-Bristol, TN-VA refers to zip_code where CBSA_name = 'Kingsport-Bristol, TN-VA'; affiliated organization refers to organization from CBSA; | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.organization",
"zip_data.zip_code"
] |
5,175 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the zip codes and the congress representatives' names of the postal points which are affiliated with Readers Digest. | SELECT T1.zip_code, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.organization = 'Readers Digest' | representative's full names refer to first_name, last_name; postal points affiliated with Readers Digest refer to zip_code where organization = 'Readers Digest'; | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.organization",
"zip_data.zip_code"
] |
5,176 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Among the postal points in California, calculate the percentage of them in post office types. | SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California' | DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California'; | [
"state.abbreviation",
"state.name",
"zip_data.state",
"zip_data.type",
"zip_data.zip_code"
] |
5,177 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What are the zip code for the Senate house? | SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.House = 'House of Repsentatives' GROUP BY T2.zip_code | House of Repsentatives can stand for senate house | [
"congress.House",
"congress.cognress_rep_id",
"zip_congress.district",
"zip_congress.zip_code"
] |
5,178 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which city has the most bad aliases? | SELECT T2.city FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T1.bad_alias ORDER BY COUNT(T1.zip_code) DESC LIMIT 1 | the most bad aliases refer to MAX(COUNT(bad_alias)); | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,179 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List all the counties in Georgia. | SELECT T2.county FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Georgia' GROUP BY T2.county | Georgia is the name of the state, in which name = 'Georgia'; | [
"country.county",
"country.state",
"state.abbreviation",
"state.name"
] |
5,180 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List all the locations of postal points with the area code "410". | SELECT T2.latitude, T2.longitude FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 410 | latitude and longitude coordinates can be used to identify the location; postal points refer to zip_code; | [
"area_code.area_code",
"area_code.zip_code",
"zip_data.latitude",
"zip_data.longitude",
"zip_data.zip_code"
] |
5,181 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the name of the CBSA of the city with the highest average house value? | SELECT DISTINCT T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.avg_house_value = ( SELECT MAX(avg_house_value) FROM zip_data ) LIMIT 1 | the highest average house value refers to avg_house_value; | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"zip_data.CBSA",
"zip_data.avg_house_value"
] |
5,182 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What are the bad aliases of the postal points from East Setauket? | SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'East Setauket' | East Setauket is the city; | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,183 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What was the population of Wilcox County in 2010? | SELECT SUM(T2.population_2010) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'WILCOX' | population of Wilcox County in 2010 refers to SUM(population_2010) where county = 'WILCOX'; | [
"country.county",
"country.zip_code",
"zip_data.population_2010",
"zip_data.zip_code"
] |
5,184 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the code of the area with the largest Asian population? | SELECT T1.zip_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.asian_population ORDER BY T2.asian_population DESC LIMIT 1 | the code of the area refers to area_code; area with the largest Asian population refers to MAX(asian_population); | [
"area_code.zip_code",
"zip_data.asian_population",
"zip_data.zip_code"
] |
5,185 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | List all the cities with micro CBSA. | SELECT T2.city FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_type = 'Micro' | micro CBSA refers to CBSA_type = 'Micro'; | [
"CBSA.CBSA",
"CBSA.CBSA_type",
"zip_data.CBSA",
"zip_data.city"
] |
5,186 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the name of the state with the most counties? | SELECT T1.name FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state GROUP BY T2.state ORDER BY COUNT(T2.county) DESC LIMIT 1 | the most counties refer to MAX(COUNT(county)); | [
"country.county",
"country.state",
"state.abbreviation",
"state.name"
] |
5,187 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the number of households in the "FL-10" district? | SELECT SUM(CASE WHEN T2.district = 'FL-10' THEN 1 ELSE 0 END) FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code | [
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.zip_code"
] | |
5,188 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the average household income in the city known as "Danzig"? | SELECT T2.avg_income_per_household FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Danzig' | average household income refers to avg_income_per_household; city known as "Danzig" refers to bad_alias = 'Danzig'; | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.avg_income_per_household",
"zip_data.zip_code"
] |
5,189 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What are the states with an above-average female population? | SELECT DISTINCT T2.state FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T2.female_population > ( SELECT AVG(female_population) FROM zip_data ) | above-average female population refers to female_population > DIVIDE(SUM(female_population), COUNT(state)); | [
"state.abbreviation",
"zip_data.female_population",
"zip_data.state"
] |
5,190 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What percentage of households are in "Coroyell" out of its state? | SELECT CAST(SUM(CASE WHEN T1.county = 'CORYELL' THEN T2.households ELSE 0 END) AS REAL) * 100 / SUM(T2.households) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code | DIVIDE(SUM(households where county = 'CORYELL'), SUM(households)) as percentage; | [
"country.county",
"country.zip_code",
"zip_data.households",
"zip_data.zip_code"
] |
5,191 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the name and the position of the CBSA officer in the city of Cabo Rojo? | SELECT T1.CBSA_name, T1.CBSA_type FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'Cabo Rojo' GROUP BY T1.CBSA_name, T1.CBSA_type | name of the CBSA officer refers to CBSA_name; position of the CBSA officer refers to CBSA_type; | [
"CBSA.CBSA",
"CBSA.CBSA_name",
"CBSA.CBSA_type",
"zip_data.CBSA",
"zip_data.city"
] |
5,192 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Indicate the country name of the city Las Marias. | SELECT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Las Marias' | [
"country.county",
"country.zip_code",
"zip_data.city",
"zip_data.zip_code"
] | |
5,193 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | How many cities does congressman Pierluisi Pedro represent? | SELECT COUNT(DISTINCT T1.city) FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Pierluisi' AND T3.last_name = 'Pedro' | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.city",
"zip_data.zip_code"
] | |
5,194 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the names of bad aliases in the city of Aguadilla. | SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Aguadilla' | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.city",
"zip_data.zip_code"
] | |
5,195 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Indicate the name of the congressman represent in Guanica. | SELECT T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.city = 'Guanica' | name of congressman implies full name which refers to first_name, last_name; Guanica is the city; | [
"congress.cognress_rep_id",
"congress.first_name",
"congress.last_name",
"zip_congress.district",
"zip_congress.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,196 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which state has the most bad aliases? | SELECT T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.state ORDER BY COUNT(T1.bad_alias) DESC LIMIT 1 | the most bad aliases refer to MAX(COUNT(bad_alias)); | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.state",
"zip_data.zip_code"
] |
5,197 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | What is the difference in the number of bad alias between Aguada city and Aguadilla city? | SELECT COUNT(CASE WHEN T2.city = 'Aguada' THEN T1.bad_alias ELSE NULL END) - COUNT(CASE WHEN T2.city = 'Aguadilla' THEN T1.bad_alias ELSE NULL END) AS DIFFERENCE FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code | SUBTRACT(COUNT(bad_alias where city = 'Aguada'), COUNT(bad_alias where city = 'Aguadilla')); | [
"avoid.bad_alias",
"avoid.zip_code",
"zip_data.city",
"zip_data.zip_code"
] |
5,198 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Which state has greater than 50 CBSA officers of metro type? | SELECT T2.state FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_type = 'Metro' GROUP BY T2.state HAVING COUNT(T1.CBSA_type) > 50 | greater than 50 CBSA officers of metro type refers to COUNT(CBSA_type = 'Metro') > 50; | [
"CBSA.CBSA",
"CBSA.CBSA_type",
"zip_data.CBSA",
"zip_data.state"
] |
5,199 | address | CREATE TABLE CBSA
(
CBSA INTEGER
primary key,
CBSA_name TEXT,
CBSA_type TEXT
);
CREATE TABLE state
(
abbreviation TEXT
primary key,
name TEXT
);
CREATE TABLE congress
(
cognress_rep_id TEXT
primary key,
first_name TEXT,
last_name ... | Provide the population of Arecibo in 2020. | SELECT SUM(T2.population_2020) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'ARECIBO' | population of Arecibo in 2020 refers to SUM(population_2020) where county = 'ARECIBO'; | [
"country.county",
"country.zip_code",
"zip_data.population_2020",
"zip_data.zip_code"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.