Chinastark/bird_dataset huggingface dataset:
Database: address
Note: location coordinate refers to (latitude, longitude);
Question: Give the location coordinates of the city with area code 636.
SQL: SELECT zip_data.latitude, zip_data.longitude FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE area_code.area_code = 636
Database: address
Question: Show the zip code of the county represented by Buchanan Vernon.
SQL: SELECT zip_congress.zip_code FROM congress INNER JOIN zip_congress ON congress.cognress_rep_id = zip_congress.district WHERE congress.first_name = 'Buchanan' AND congress.last_name = 'Vernon'
Database: address
Question: Which state is area code 878 in? Give the name of the state.
SQL: SELECT zip_data.state FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE area_code.area_code = 878
Database: address
Note: "Virginia" is the state;
Question: How many counties are there in Virginia State?
SQL: SELECT count(country.county) FROM state INNER JOIN country ON state.abbreviation = country.state WHERE state.name = 'Virginia'
Database: address
Note: position refers to latitude, longitude;
Question: Give the name and the position of the cbsa officer from the area with the zip code 45503.
SQL: SELECT cbsa.cbsa_name, zip_data.latitude, zip_data.longitude FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE zip_data.zip_code = 45503 GROUP BY cbsa.cbsa_name, zip_data.latitude, zip_data.longitude
Database: address
Note: name of county refers to county;
Question: Tell the name of the county which is represented by Hartzler Vicky.
SQL: SELECT country.county FROM country INNER JOIN zip_congress ON country.zip_code = zip_congress.zip_code INNER JOIN congress ON zip_congress.district = congress.cognress_rep_id WHERE congress.first_name = 'Hartzler' AND congress.last_name = 'Vicky' GROUP BY country.county
Database: address
Note: average male median age refers to Divide (Sum(male_median_age), Count(county)); 'WINDHAM' is the county;
Question: Calculate the average male median age of all the residential areas in Windham county.
SQL: SELECT sum(zip_data.male_median_age) / count(zip_data.median_age) FROM country INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE country.county = 'WINDHAM'
Database: address
Note: average female median age refers to Divide (Sum(female_median_age), Count(county));
Question: For the county where DeSantis Ron is from, what is the average female median age?
SQL: SELECT sum(zip_data.female_median_age) / count(country.county) FROM country INNER JOIN zip_congress ON country.zip_code = zip_congress.zip_code INNER JOIN congress ON zip_congress.district = congress.cognress_rep_id INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE congress.first_name = 'DeSantis' AND congress.last_name = 'Ron'
Database: address
Note: "Bishopville" is the city; 'SC' is the state;
Question: What is the area code of Bishopville, SC?
SQL: SELECT area_code.area_code FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE zip_data.city = 'Bishopville' AND zip_data.state = 'SC'
Database: address
Note: "Geneva" is the city; 'AL' is the state;
Question: Name the bad alias of Geneva, AL.
SQL: SELECT avoid.bad_alias FROM avoid INNER JOIN zip_data ON avoid.zip_code = zip_data.zip_code WHERE zip_data.city = 'Geneva' AND zip_data.state = 'AL'
Database: address
Note: "Lawrenceville" is the bad_alias;
Question: Which city and state has the bad alias of Lawrenceville?
SQL: SELECT zip_data.city, zip_data.state FROM avoid INNER JOIN zip_data ON avoid.zip_code = zip_data.zip_code WHERE avoid.bad_alias = 'Lawrenceville' GROUP BY zip_data.city, zip_data.state
Database: address
Question: Name both the alias and the bad alias of zip code 38015.
SQL: SELECT ALIAS.alias, avoid.bad_alias FROM ALIAS INNER JOIN avoid ON ALIAS.zip_code = avoid.zip_code WHERE ALIAS.zip_code = 38015
Database: address
Question: What is the zip code of the district represented by Steven A King?
SQL: SELECT zip_congress.zip_code FROM congress INNER JOIN zip_congress ON congress.cognress_rep_id = zip_congress.district WHERE congress.first_name = 'King' AND congress.last_name = 'Steven A'
Database: address
Note: "York" is the city; 'ME' is the state; type refers to cbsa_type;
Question: What is the CBSA name and type in York, ME?
SQL: SELECT cbsa.cbsa_name, cbsa.cbsa_type FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE zip_data.city = 'York' AND zip_data.state = 'ME'
Database: address
Note: median age over 40 refers to median_age > 40;
Question: List 10 cities with a median age over 40. Include their zip codes and area codes.
SQL: SELECT zip_data.city, zip_data.zip_code, area_code.area_code FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE zip_data.median_age >= 40 LIMIT 10
Database: address
Note: "Druid Hills" is the bad_alias;
Question: Name the county that has the bad alias of Druid Hills.
SQL: SELECT country.county FROM avoid INNER JOIN country ON avoid.zip_code = country.zip_code WHERE avoid.bad_alias = 'Druid Hills'
Database: address
Note: "PHILLIPS" is the county; 'Montana' is the name of state;
Question: What is the area code of Phillips county in Montana?
SQL: SELECT DISTINCT area_code.area_code FROM area_code INNER JOIN country ON area_code.zip_code = country.zip_code INNER JOIN state ON country.state = state.abbreviation WHERE country.county = 'PHILLIPS' AND state.name = 'Montana'
Database: address
Note: "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;
Question: Which district has the largest land area in Wisconsin? Write the full name of the congress representative and include the postal codes.
SQL: SELECT zip_congress.zip_code, congress.first_name, congress.last_name FROM congress INNER JOIN zip_congress ON congress.cognress_rep_id = zip_congress.district WHERE congress.state = 'Wisconsin' ORDER BY congress.land_area DESC LIMIT 1
Database: address
Note: central time zone refers to time_zone = 'Central';
Question: How many states are in the central time zone? Write their full names.
SQL: SELECT sum(CASE WHEN zip_data.time_zone = 'Central' THEN 1 ELSE 0 END) AS COUNT FROM zip_data INNER JOIN state ON state.abbreviation = zip_data.state WHERE zip_data.time_zone = 'Central'
Database: address
Note: "Lexington-Fayette, KY" is the cbsa_name;
Question: Name 10 cities with their states that are under the Lexington-Fayette, KY office of the Canada Border Services Agency.
SQL: SELECT DISTINCT zip_data.city, zip_data.state FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE cbsa.cbsa_name = 'Lexington-Fayette, KY' LIMIT 10
Database: address
Note: "Democrats" and "Republicans" refers to party = 'Democrat" and party = 'Republican'; percentage ratio = Multiply (Divide (Count(party = 'Democrat"), Count(party = 'Republican')), 100);
Question: What is the percentage ratio between Democrats and Republicans in Indiana? List the zip codes belonging to Democrats.
SQL: SELECT cast(count(CASE WHEN congress.party = 'Democrat' THEN 1 ELSE NULL END) AS REAL) / count(CASE WHEN congress.party = 'Republican' THEN 1 ELSE NULL END)FROM zip_congress INNER JOIN congress ON congress.cognress_rep_id = zip_congress.district
Database: address
Note: "Alabama" and "Illinois" are both state; Ratio = Divide (Count(state = 'Alabama'), Count(state = 'Illinois'));
Question: Calculate the ratio between the number of representatives in Alabama and the number of representatives in Illinois.
SQL: 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
Database: address
Note: average of 2020 population in each zip code refers to Divide (Sum(population_2020), Count(zip_code));
Question: Calculate the average of 2020's population in each zip code.
SQL: SELECT cast(sum(population_2020) AS REAL) / count(zip_code) FROM zip_data
Database: address
Note: "Berlin, NH" is the cbsa_name;
Question: State the male population for all zip code which were under the Berlin, NH CBSA.
SQL: SELECT zip_data.male_population FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE cbsa.cbsa_name = 'Berlin, NH' GROUP BY zip_data.male_population
Database: address
Note: has more than 10 zip codes refers to cbsa where count(cbsa) > 10;
Question: Which CBSAs have more than 10 zip codes?
SQL: SELECT cbsa.cbsa_name FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa GROUP BY cbsa.cbsa HAVING count(zip_data.zip_code) > 10
Database: address
Note: "Puerto Rico" refers to state = 'PR';
Question: List all the bad alias for zip codes in Puerto Rico.
SQL: SELECT avoid.bad_alias FROM avoid INNER JOIN zip_data ON avoid.zip_code = zip_data.zip_code WHERE zip_data.state = 'PR'
Database: address
Question: What is the longitude and latitude for the district represented by Grayson Alan?
SQL: SELECT zip_data.latitude, zip_data.longitude FROM zip_data INNER JOIN zip_congress ON zip_data.zip_code = zip_congress.zip_code INNER JOIN congress ON zip_congress.district = congress.cognress_rep_id WHERE congress.first_name = 'Grayson' AND congress.last_name = 'Alan'
Database: address
Question: What is the state for area code of 787?
SQL: SELECT DISTINCT zip_data.state FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE area_code.area_code = 787
Database: address
Note: more than 30000 population in 2020 refers to population_2020 > 30000; representative refers to first_name, last_name;
Question: List all representatives of districts which have more than 30 000 population in 2020.
SQL: SELECT congress.first_name, congress.last_name FROM zip_data INNER JOIN zip_congress ON zip_data.zip_code = zip_congress.zip_code INNER JOIN congress ON zip_congress.district = congress.cognress_rep_id WHERE zip_data.population_2020 > 30000 GROUP BY congress.first_name, congress.last_name
Database: address
Note: "Massachusetts" is the state; zip code more than 1 area code refers to Count (zip_code) > 1;
Question: Which zip code in Massachusetts that have more than 1 area code?
SQL: SELECT area_code.zip_code FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE zip_data.state = 'MA' GROUP BY area_code.zip_code HAVING count(area_code.area_code) > 1
Database: address
Note: "Arecibo" is the city;
Question: State the county for Arecibo City.
SQL: SELECT DISTINCT country.county FROM country INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE zip_data.city = 'Arecibo'
Database: address
Note: "Barre, VT" is the cbsa_name;
Question: How many zip codes are under Barre, VT?
SQL: SELECT count(zip_data.zip_code) FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE cbsa.cbsa_name = 'Barre, VT'
Database: address
Note: biggest land area refers to Max(land_area); "SAINT CROIX" is the county;
Question: Among the zip code under Saint Croix county, which zip code has the biggest land area?
SQL: SELECT country.zip_code FROM country INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE country.county = 'SAINT CROIX' ORDER BY zip_data.land_area DESC LIMIT 1
Database: address
Note: difference = Subtract (population_2020, population_2010);
Question: Calculate the difference between the 2020 population and the 2010 population for the districts represented by Griffin Tim.
SQL: SELECT zip_data.population_2020 - zip_data.population_2010 FROM zip_data INNER JOIN zip_congress ON zip_data.zip_code = zip_congress.zip_code INNER JOIN congress ON zip_congress.district = congress.cognress_rep_id WHERE congress.first_name = 'Griffin' AND congress.last_name = 'Tim'
Database: address
Note: "Atmore, AL" is cbsa_name; percentage = Divide(asian_population, population_2020) * 100;
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.
SQL: SELECT cast(zip_data.asian_population AS REAL) * 100 / zip_data.population_2010 FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE cbsa.cbsa_name = 'Atmore, AL'
Database: address
Note: highest asian population refers to Max(asian_population);
Question: Among the cities with an area code 939, which city has the highest Asian population?
SQL: SELECT zip_data.city FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE area_code.area_code = 939 ORDER BY zip_data.asian_population DESC LIMIT 1
Database: address
Note: elevation of 1039 refers to elevation = 1039;
Question: Give the name of the country and state of the city with elevation of 1039.
SQL: SELECT DISTINCT state.name, country.state FROM state INNER JOIN country ON state.abbreviation = country.state INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE zip_data.elevation = 1039
Database: address
Question: Provide the alias and elevation of the city with zip code 1028.
SQL: SELECT ALIAS.alias, zip_data.elevation FROM ALIAS INNER JOIN zip_data ON ALIAS.zip_code = zip_data.zip_code WHERE ALIAS.zip_code = 1028
Database: address
Note: largest land area refers to Max(land_area);
Question: What is the area code of the city with the largest land area?
SQL: SELECT area_code.area_code FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE zip_data.land_area = ( SELECT max(land_area) FROM zip_data )
Database: address
Question: Give the area code of the city with the white population ranging between 1700 to 2000.
SQL: SELECT area_code.area_code FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE zip_data.white_population BETWEEN 1700 AND 2000
Database: address
Question: What is the Asian population in the city with the alias Leeds?
SQL: SELECT sum(zip_data.asian_population) FROM ALIAS INNER JOIN zip_data ON ALIAS.zip_code = zip_data.zip_code WHERE ALIAS.alias = 'Leeds'
Database: address
Note: Savoy is the city;
Question: List down the area code and country of the city named Savoy.
SQL: SELECT area_code.area_code, country.county FROM area_code INNER JOIN country ON area_code.zip_code = country.zip_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE zip_data.city = 'Savoy'
Database: address
Note: with 0 population in 2010 refers to population_2010 = 0;
Question: What are the alias of the cities with 0 population in 2010?
SQL: SELECT DISTINCT ALIAS.alias FROM ALIAS INNER JOIN zip_data ON ALIAS.zip_code = zip_data.zip_code WHERE zip_data.population_2010 = 0
Database: address
Note: implement daylight savings refers to daylight_savings = 'Yes';
Question: Among the cities with area code 608, how many cities implement daylight savings?
SQL: SELECT count(zip_data.city) FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE area_code.area_code = 608 AND zip_data.daylight_savings = 'Yes'
Database: address
Note: AVG(elevation) where alias = 'Amherst';
Question: Provide the average elevation of the cities with alias Amherst.
SQL: SELECT avg(zip_data.elevation) FROM ALIAS INNER JOIN zip_data ON ALIAS.zip_code = zip_data.zip_code WHERE ALIAS.alias = 'Amherst'
Database: address
Note: Dalton is the city;
Question: What is the country and state of the city named Dalton?
SQL: SELECT country.county FROM state INNER JOIN country ON state.abbreviation = country.state INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE zip_data.city = 'Dalton' GROUP BY country.county
Database: address
Note: postal point of post office refers to type = 'Post Office';
Question: Give at least five alias of cities with a postal point of post office.
SQL: SELECT ALIAS.alias FROM ALIAS INNER JOIN zip_data ON ALIAS.zip_code = zip_data.zip_code WHERE zip_data.type = 'Post Office' LIMIT 5
Database: address
Note: SUBTRACT(COUNT(type = 'P.O. Box Only'), COUNT(type = 'Post Office')) where 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?
SQL: SELECT count(CASE WHEN zip_data.type = 'P.O. Box Only' THEN 1 ELSE NULL END) - count(CASE WHEN zip_data.type = 'Post Office' THEN 1 ELSE NULL END) AS difference FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE area_code.area_code = 787
Database: address
Note: DIVIDE(SUBTRACT(SUM(population_2020)), SUM(population_2010)), SUM(population_2010) as percentage where county = '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.
SQL: SELECT cast((sum(zip_data.population_2020) - sum(zip_data.population_2010)) AS REAL) * 100 / sum(zip_data.population_2010) FROM country INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE zip_data.city = 'Arroyo'
Database: address
Note: Texas is the name of the state, in which name = 'Texas'; total beneficiaries of above 10000 refer to 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.
SQL: SELECT zip_data.zip_code, zip_data.city FROM state INNER JOIN zip_data ON state.abbreviation = zip_data.state WHERE state.name = 'Texas' AND zip_data.total_beneficiaries > 10000
Database: address
Note: 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;
Question: Among the postal points in the District of Columbia, how many of them have an area with above 20000 black population?
SQL: SELECT count(country.zip_code) FROM country INNER JOIN zip_data ON country.zip_code = zip_data.zip_code WHERE country.county = 'DISTRICT OF COLUMBIA' AND zip_data.black_population > 20000
Database: address
Question: Provide the city where zip code 19019 is located and the alias of that city.
SQL: SELECT zip_data.city, ALIAS.alias FROM ALIAS INNER JOIN zip_data ON ALIAS.zip_code = zip_data.zip_code WHERE ALIAS.zip_code = 19019
Database: address
Note: postal points refer to zip_code; Camuy is the city;
Question: List the bad alias of the postal point located in Camuy.
SQL: SELECT avoid.bad_alias FROM avoid INNER JOIN zip_data ON avoid.zip_code = zip_data.zip_code WHERE zip_data.city = 'Camuy'
Database: address
Note: representative's full names refer to first_name, last_name; area which has highest population in 2020 refers to MAX(population_2020);
Question: Provide the zip code, city, and congress representative's full names of the area which has highest population in 2020.
SQL: SELECT zip_data.zip_code, zip_data.city, congress.first_name, congress.last_name FROM zip_data INNER JOIN zip_congress ON zip_data.zip_code = zip_congress.zip_code INNER JOIN congress ON zip_congress.district = congress.cognress_rep_id GROUP BY zip_congress.district ORDER BY zip_data.population_2020 DESC LIMIT 1
Database: address
Note: 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';
Question: Among the daylight savings areas in the Midwest region, how many postal points are there in Illinois?
SQL: SELECT count(zip_data.zip_code) FROM state INNER JOIN zip_data ON state.abbreviation = zip_data.state WHERE state.name = 'Illinois' AND zip_data.daylight_savings = 'Yes' AND zip_data.region = 'Midwest'
Database: address
Note: the Virgin Islands refer to state where name = 'Virgin Islands';
Question: Provide the countries and the zip codes in the Virgin Islands.
SQL: SELECT country.county, country.zip_code FROM state INNER JOIN country ON state.abbreviation = country.state WHERE state.name = 'Virgin Islands'
Database: address
Note: Greeneville is the city;
Question: Provide the zip codes and the alias of Greeneville.
SQL: SELECT zip_data.zip_code, ALIAS.alias FROM ALIAS INNER JOIN zip_data ON ALIAS.zip_code = zip_data.zip_code WHERE zip_data.city = 'Greeneville'
Database: address
Note: COUNT(zip_code where first_name = 'Smith' and last_name = 'Adrian') > COUNT(zip_code where first_name = 'Heck' and last_name = 'Joe');
Question: Compare the numbers of postal points under Smith Adrian and Heck Joe.
SQL: SELECT CASE WHEN count(CASE WHEN congress.first_name = 'Smith' AND congress.last_name = 'Adrian' THEN zip_congress.zip_code ELSE NULL END) > count(CASE WHEN congress.first_name = 'Heck' AND congress.last_name = 'Joe' THEN zip_congress.zip_code ELSE NULL END) THEN 'Smith Adrian>Heck Joe' ELSE 'Smith Adrian<=Heck Joe' END AS compare FROM congress INNER JOIN zip_congress ON congress.cognress_rep_id = zip_congress.district
Database: address
Note: cbsa officers refer to cbsa_name; postal point refers to zip_code; Oxford is the city;
Question: Provide the zip codes and CBSA officers of the postal point in Oxford.
SQL: SELECT zip_data.zip_code, cbsa.cbsa_name FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE zip_data.city = 'Oxford'
Database: address
Note: 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;
Question: Provide the zip codes and their affiliated organization for the postal point under Kingsport-Bristol, TN-VA.
SQL: SELECT zip_data.zip_code, zip_data.organization FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE cbsa.cbsa_name = 'Kingsport-Bristol, TN-VA'
Database: address
Note: representative's full names refer to first_name, last_name; postal points affiliated with Readers Digest refer to zip_code where organization = 'Readers Digest';
Question: Provide the zip codes and the congress representatives' names of the postal points which are affiliated with Readers Digest.
SQL: SELECT zip_data.zip_code, congress.first_name, congress.last_name FROM zip_data INNER JOIN zip_congress ON zip_data.zip_code = zip_congress.zip_code INNER JOIN congress ON zip_congress.district = congress.cognress_rep_id WHERE zip_data.organization = 'Readers Digest'
Database: address
Note: DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California';
Question: Among the postal points in California, calculate the percentage of them in post office types.
SQL: SELECT cast(count(CASE WHEN zip_data.type = 'Post Office' THEN zip_data.zip_code ELSE NULL END) AS REAL) * 100 / count(zip_data.zip_code) FROM state INNER JOIN zip_data ON state.abbreviation = zip_data.state WHERE state.name = 'California'
Database: address
Note: house of Repsentatives can stand for senate house;
Question: What are the zip code for the Senate house?
SQL: SELECT zip_congress.zip_code FROM congress INNER JOIN zip_congress ON congress.cognress_rep_id = zip_congress.district WHERE congress.house = 'House of Repsentatives' GROUP BY zip_congress.zip_code
Database: address
Note: the most bad aliases refer to MAX(COUNT(bad_alias));
Question: Which city has the most bad aliases?
SQL: SELECT zip_data.city FROM avoid INNER JOIN zip_data ON avoid.zip_code = zip_data.zip_code GROUP BY avoid.bad_alias ORDER BY count(avoid.zip_code) DESC LIMIT 1
Database: address
Note: Georgia is the name of the state, in which name = 'Georgia';
Question: List all the counties in Georgia.
SQL: SELECT country.county FROM state INNER JOIN country ON state.abbreviation = country.state WHERE state.name = 'Georgia' GROUP BY country.county
Database: address
Note: latitude and longitude coordinates can be used to identify the location; postal points refer to zip_code;
Question: List all the locations of postal points with the area code "410".
SQL: SELECT zip_data.latitude, zip_data.longitude FROM area_code INNER JOIN zip_data ON area_code.zip_code = zip_data.zip_code WHERE area_code.area_code = 410
Database: address
Note: the highest average house value refers to avg_house_value;
Question: What is the name of the CBSA of the city with the highest average house value?
SQL: SELECT DISTINCT cbsa.cbsa_name FROM cbsa INNER JOIN zip_data ON cbsa.cbsa = zip_data.cbsa WHERE zip_data.avg_house_value = ( SELECT max(avg_house_value) FROM zip_data ) LIMIT 1