db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
address | 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 | Question: what are the precise locations of the cities with an area code of 787? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, ty... | what are the precise locations of the cities with an area code of 787? |
address | 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' | Question: in california, how many delivery receptacles are there in the community post office that has the highest number of delivery receptacles? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, Distri... | in california, how many delivery receptacles are there in the community post office that has the highest number of delivery receptacles? |
address | 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 | Question: in which county can you find the city with the highest number of females? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county,... | in which county can you find the city with the highest number of females? |
address | select distinct t2.name from zip_data as t1 inner join state as t2 on t1.state = t2.abbreviation where t1.division is null | Question: what are the names of the states whose postal point is not affiliated with any organization? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, s... | what are the names of the states whose postal point is not affiliated with any organization? |
address | 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 | Question: what is the difference in the most populated city of allentown-bethlehem-easton, pa-nj in 2020 against its population in 2010? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_a... | what is the difference in the most populated city of allentown-bethlehem-easton, pa-nj in 2020 against its population in 2010? |
address | 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' | Question: list all the zip codes in the county of new castle in delaware. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, org... | list all the zip codes in the county of new castle in delaware. |
address | 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 | Question: how many representatives are there in the state with the highest monthly benefit payments for retired workers? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data ->... | how many representatives are there in the state with the highest monthly benefit payments for retired workers? |
address | 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 | Question: in the state where lisa murkowski is the representative, how many cities have zero employees? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, ... | in the state where lisa murkowski is the representative, how many cities have zero employees? |
address | 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 | Question: what are the top 3 states with the highest asian population? list the full names of all the representatives in the said states. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_... | what are the top 3 states with the highest asian population? list the full names of all the representatives in the said states. |
address | select distinct t2.name from country as t1 inner join state as t2 on t1.state = t2.abbreviation where t1.county = 'outagamie' | Question: which state is outagamie county in? give the full name of the state. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type... | which state is outagamie county in? give the full name of the state. |
address | 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 | Question: what party does the area with the zip code 91701 belong to? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organiz... | what party does the area with the zip code 91701 belong to? |
address | 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' | Question: how many males are there in new haven county's residential areas? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, o... | how many males are there in new haven county's residential areas? |
address | 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 | Question: show the alias for the county at coordinate (18.090875, -66.867756). | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type... | show the alias for the county at coordinate (18.090875, -66.867756). |
address | 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 | Question: for the city with the most elders, what's its area code? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organizati... | for the city with the most elders, what's its area code? |
address | 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' | Question: for the county represented by thompson bennie g, how many bad aliases does it have? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, mul... | for the county represented by thompson bennie g, how many bad aliases does it have? |
address | 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 | Question: give the location coordinates of the city with area code 636. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organ... | give the location coordinates of the city with area code 636. |
address | 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' | Question: show the zip code of the county represented by buchanan vernon. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, org... | show the zip code of the county represented by buchanan vernon. |
address | 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 | Question: which state is area code 878 in? give the name of the state. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organi... | which state is area code 878 in? give the name of the state. |
address | select count(t2.county) from state as t1 inner join country as t2 on t1.abbreviation = t2.state where t1.name = 'virginia' | Question: how many counties are there in virginia state? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_z... | how many counties are there in virginia state? |
address | 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 | Question: give the name and the position of the cbsa officer from the area with the zip code 45503. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, stat... | give the name and the position of the cbsa officer from the area with the zip code 45503. |
address | 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 | Question: tell the name of the county which is represented by hartzler vicky. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type,... | tell the name of the county which is represented by hartzler vicky. |
address | 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' | Question: calculate the average male median age of all the residential areas in windham county. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, m... | calculate the average male median age of all the residential areas in windham county. |
address | 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' | Question: for the county where desantis ron is from, what is the average female median age? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi... | for the county where desantis ron is from, what is the average female median age? |
address | 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' | Question: what is the area code of bishopville, sc? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, ... | what is the area code of bishopville, sc? |
address | 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' | Question: name the bad alias of geneva, al. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, daylight... | name the bad alias of geneva, al. |
address | 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 | Question: which city and state has the bad alias of lawrenceville? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organizati... | which city and state has the bad alias of lawrenceville? |
address | 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 | Question: name both the alias and the bad alias of zip code 38015. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organizati... | name both the alias and the bad alias of zip code 38015. |
address | 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' | Question: what is the zip code of the district represented by steven a king? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, ... | what is the zip code of the district represented by steven a king? |
address | 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' | Question: what is the cbsa name and type in york, me? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone... | what is the cbsa name and type in york, me? |
address | 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 | Question: list 10 cities with a median age over 40. include their zip codes and area codes. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi... | list 10 cities with a median age over 40. include their zip codes and area codes. |
address | 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' | Question: name the county that has the bad alias of druid hills. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization... | name the county that has the bad alias of druid hills. |
address | 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' | Question: what is the area code of phillips county in montana? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, ... | what is the area code of phillips county in montana? |
address | 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 | Question: which district has the largest land area in wisconsin? write the full name of the congress representative and include the postal codes. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, Distric... | which district has the largest land area in wisconsin? write the full name of the congress representative and include the postal codes. |
address | 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' | Question: how many states are in the central time zone? write their full names. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, typ... | how many states are in the central time zone? write their full names. |
address | 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 | Question: name 10 cities with their states that are under the lexington-fayette, ky office of the canada border services agency. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip... | name 10 cities with their states that are under the lexington-fayette, ky office of the canada border services agency. |
address | 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 | Question: what is the percentage ratio between democrats and republicans in indiana? list the zip codes belonging to democrats. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_... | what is the percentage ratio between democrats and republicans in indiana? list the zip codes belonging to democrats. |
address | 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 | Question: calculate the ratio between the number of representatives in alabama and the number of representatives in illinois. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_da... | calculate the ratio between the number of representatives in alabama and the number of representatives in illinois. |
address | select cast(sum(population_2020) as real) / count(zip_code) from zip_data | Question: calculate the average of 2020's population in each zip code. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organi... | calculate the average of 2020's population in each zip code. |
address | 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 | Question: state the male population for all zip code which were under the berlin, nh cbsa. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_... | state the male population for all zip code which were under the berlin, nh cbsa. |
address | 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 | Question: which cbsas have more than 10 zip codes? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, d... | which cbsas have more than 10 zip codes? |
address | 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' | Question: list all the bad alias for zip codes in puerto rico. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, ... | list all the bad alias for zip codes in puerto rico. |
address | 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' | Question: what is the longitude and latitude for the district represented by grayson alan? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_... | what is the longitude and latitude for the district represented by grayson alan? |
address | 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 | Question: what is the state for area code of 787? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, da... | what is the state for area code of 787? |
address | 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 | Question: list all representatives of districts which have more than 30 000 population in 2020. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, m... | list all representatives of districts which have more than 30 000 population in 2020. |
address | 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 | Question: which zip code in massachusetts that have more than 1 area code? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, or... | which zip code in massachusetts that have more than 1 area code? |
address | 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' | Question: state the county for arecibo city. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, dayligh... | state the county for arecibo city. |
address | 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' | Question: how many zip codes are under barre, vt? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, da... | how many zip codes are under barre, vt? |
address | 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 | Question: among the zip code under saint croix county, which zip code has the biggest land area? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, ... | among the zip code under saint croix county, which zip code has the biggest land area? |
address | 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' | Question: calculate the difference between the 2020 population and the 2010 population for the districts represented by griffin tim. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area.... | calculate the difference between the 2020 population and the 2010 population for the districts represented by griffin tim. |
address | 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' | Question: based on the population in 2020, calculate the percentage for the population of asian in the zip code where the cbsa was atmore, al. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, ... | based on the population in 2020, calculate the percentage for the population of asian in the zip code where the cbsa was atmore, al. |
address | 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 | Question: among the cities with an area code 939, which city has the highest asian population? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, mu... | among the cities with an area code 939, which city has the highest asian population? |
address | 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 | Question: give the name of the country and state of the city with elevation of 1039. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county... | give the name of the country and state of the city with elevation of 1039. |
address | 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 | Question: provide the alias and elevation of the city with zip code 1028. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, org... | provide the alias and elevation of the city with zip code 1028. |
address | 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 ) | Question: what is the area code of the city with the largest land area? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organ... | what is the area code of the city with the largest land area? |
address | 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 | Question: give the area code of the city with the white population ranging between 1700 to 2000. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, ... | give the area code of the city with the white population ranging between 1700 to 2000. |
address | 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' | Question: what is the asian population in the city with the alias leeds? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, orga... | what is the asian population in the city with the alias leeds? |
address | 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' | Question: list down the area code and country of the city named savoy. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organi... | list down the area code and country of the city named savoy. |
address | 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 | Question: what are the alias of the cities with 0 population in 2010? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organiz... | what are the alias of the cities with 0 population in 2010? |
address | 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' | Question: among the cities with area code 608, how many cities implement daylight savings? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_... | among the cities with area code 608, how many cities implement daylight savings? |
address | 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' | Question: provide the average elevation of the cities with alias amherst. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, org... | provide the average elevation of the cities with alias amherst. |
address | 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 | Question: what is the country and state of the city named dalton? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organizatio... | what is the country and state of the city named dalton? |
address | 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 | Question: give at least five alias of cities with a postal point of post office. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, ty... | give at least five alias of cities with a postal point of post office. |
address | 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 | Question: 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? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, la... | 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? |
address | 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' | Question: among the cities belonging to the country named arroyo, calculate the percentage of increase in the population in these cities from 2010 to 2020. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, Hous... | among the cities belonging to the country named arroyo, calculate the percentage of increase in the population in these cities from 2010 to 2020. |
address | 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 | Question: among the postal points in texas, provide the zip codes and cities of postal points which have total beneficiaries of above 10000. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, la... | among the postal points in texas, provide the zip codes and cities of postal points which have total beneficiaries of above 10000. |
address | 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 | Question: among the postal points in the district of columbia, how many of them have an area with above 20000 black population? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_... | among the postal points in the district of columbia, how many of them have an area with above 20000 black population? |
address | 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 | Question: provide the city where zip code 19019 is located and the alias of that city. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_coun... | provide the city where zip code 19019 is located and the alias of that city. |
address | 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' | Question: list the bad alias of the postal point located in camuy. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organizati... | list the bad alias of the postal point located in camuy. |
address | 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 | Question: provide the zip code, city, and congress representative's full names of the area which has highest population in 2020. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip... | provide the zip code, city, and congress representative's full names of the area which has highest population in 2020. |
address | 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' | Question: among the daylight savings areas in the midwest region, how many postal points are there in illinois? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code... | among the daylight savings areas in the midwest region, how many postal points are there in illinois? |
address | 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' | Question: provide the countries and the zip codes in the virgin islands. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, orga... | provide the countries and the zip codes in the virgin islands. |
address | 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' | Question: provide the zip codes and the alias of greeneville. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, t... | provide the zip codes and the alias of greeneville. |
address | 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 ... | Question: compare the numbers of postal points under smith adrian and heck joe. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, typ... | compare the numbers of postal points under smith adrian and heck joe. |
address | 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' | Question: provide the zip codes and cbsa officers of the postal point in oxford. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, ty... | provide the zip codes and cbsa officers of the postal point in oxford. |
address | 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' | Question: provide the zip codes and their affiliated organization for the postal point under kingsport-bristol, tn-va. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> z... | provide the zip codes and their affiliated organization for the postal point under kingsport-bristol, tn-va. |
address | 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' | Question: provide the zip codes and the congress representatives' names of the postal points which are affiliated with readers digest. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_are... | provide the zip codes and the congress representatives' names of the postal points which are affiliated with readers digest. |
address | 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' | Question: among the postal points in california, calculate the percentage of them in post office types. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, ... | among the postal points in california, calculate the percentage of them in post office types. |
address | 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 | Question: what are the zip code for the senate house? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone... | what are the zip code for the senate house? |
address | 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 | Question: which city has the most bad aliases? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, dayli... | which city has the most bad aliases? |
address | 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 | Question: list all the counties in georgia. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, daylight... | list all the counties in georgia. |
address | 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 | Question: list all the locations of postal points with the area code '410'. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, o... | list all the locations of postal points with the area code '410'. |
address | 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 | Question: what is the name of the cbsa of the city with the highest average house value? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_co... | what is the name of the cbsa of the city with the highest average house value? |
address | 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' | Question: what are the bad aliases of the postal points from east setauket? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, o... | what are the bad aliases of the postal points from east setauket? |
address | 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' | Question: what was the population of wilcox county in 2010? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, tim... | what was the population of wilcox county in 2010? |
address | 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 | Question: what is the code of the area with the largest asian population? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, org... | what is the code of the area with the largest asian population? |
address | select t2.city from cbsa as t1 inner join zip_data as t2 on t1.cbsa = t2.cbsa where t1.cbsa_type = 'micro' | Question: list all the cities with micro cbsa. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, dayli... | list all the cities with micro cbsa. |
address | 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 | Question: what is the name of the state with the most counties? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization,... | what is the name of the state with the most counties? |
address | 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 | Question: what is the number of households in the 'fl-10' district? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organizat... | what is the number of households in the 'fl-10' district? |
address | 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' | Question: what is the average household income in the city known as 'danzig'? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type,... | what is the average household income in the city known as 'danzig'? |
address | 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 ) | Question: what are the states with an above-average female population? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organi... | what are the states with an above-average female population? |
address | 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 | Question: what percentage of households are in 'coroyell' out of its state? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, o... | what percentage of households are in 'coroyell' out of its state? |
address | 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 | Question: what is the name and the position of the cbsa officer in the city of cabo rojo? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_c... | what is the name and the position of the cbsa officer in the city of cabo rojo? |
address | 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' | Question: indicate the country name of the city las marias. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, tim... | indicate the country name of the city las marias. |
address | 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' | Question: how many cities does congressman pierluisi pedro represent? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organiz... | how many cities does congressman pierluisi pedro represent? |
address | 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' | Question: provide the names of bad aliases in the city of aguadilla. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organiza... | provide the names of bad aliases in the city of aguadilla. |
address | 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' | Question: indicate the name of the congressman represent in guanica. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organiza... | indicate the name of the congressman represent in guanica. |
address | 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 | Question: which state has the most bad aliases? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, dayl... | which state has the most bad aliases? |
address | 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 | Question: what is the difference in the number of bad alias between aguada city and aguadilla city? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, stat... | what is the difference in the number of bad alias between aguada city and aguadilla city? |
address | 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 | Question: which state has greater than 50 cbsa officers of metro type? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organi... | which state has greater than 50 cbsa officers of metro type? |
address | 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' | Question: provide the population of arecibo in 2020. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone,... | provide the population of arecibo in 2020. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.