context
stringlengths 11
9.12k
| question
stringlengths 0
1.06k
| SQL
stringlengths 2
4.44k
| source
stringclasses 28
values |
---|---|---|---|
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | At which age did A Lamusi participate in 2012 Summer? | SELECT T2.age FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2012 Summer' AND T3.full_name = 'A Lamusi' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many competitors were there who participated in 2000 Summer with age 31? | SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2000 Summer' AND T2.age = 31 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many male competitors were there who participated in 1948 Summer? | SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '1948 Summer' AND T3.gender = 'M' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Please list all competitors' names who participated in 1936 Summer. | SELECT T3.full_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '1936 Summer' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Who is the youngest competitor that participated in 2014 Winter? | SELECT T3.full_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2014 Winter' ORDER BY T2.age LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the average age of competitors who participated in 1988 Winter? | SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '1988 Winter' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the percentage of female competitors whose heights are over 170 that participated in the game in 1988? | SELECT CAST(COUNT(CASE WHEN T3.gender = 'F' AND T3.height > 170 THEN 1 END) AS REAL) * 100 / COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_year = 1988 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the sport name of "Cross Country Skiing Men's 10/15 kilometres Pursuit" event? | SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Cross Country Skiing Men%s 10/15 kilometres Pursuit' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the percentage of people whose age greater than 24 and participate in winter season? | SELECT CAST(COUNT(CASE WHEN T2.age > 24 AND T1.season = 'Winter' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.games_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the region id of Christine Jacoba Aaftink? | SELECT T1.region_id FROM person_region AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.id WHERE T2.full_name = 'Christine Jacoba Aaftink' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Mention the height of people who belong to region id 7. | SELECT T2.height FROM person_region AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.id WHERE T1.region_id = 7 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | State the name of the city that held game id 3. | SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T1.games_id = 3 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What are the id of the games held in London? | SELECT T1.games_id FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'London' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many people who are below 30 and participated in the summer season? | SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' AND T2.age < 30 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | List out the name of the game that the people participated in games id 13. | SELECT DISTINCT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T2.games_id = 13 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the average age of the people who participated in the winter season? | SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Winter' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the percentage of the people who are under 35 and participated in the summer season? | SELECT CAST(COUNT(CASE WHEN T2.age < 35 THEN 1 END) AS REAL) * 100 / COUNT(T2.games_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | State the event name of Basketball. | SELECT T2.event_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Basketball' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the name of medal that competitor id 9 obtained? | SELECT DISTINCT T1.medal_name FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id WHERE T2.competitor_id = 9 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | List out the id of event that achieve the gold medal. | SELECT T2.event_id FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id WHERE T1.medal_name = 'Gold' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Who is the heaviest athlete? | SELECT full_name FROM person ORDER BY weight DESC LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Which city were the Olympic games held in 1992? | SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_year = 1992 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Which region is the majority of the athletes from? | SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the name of the oldest competitor? | SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id ORDER BY T2.age DESC LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Which sport did John Aalberg participate in? | SELECT DISTINCT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id INNER JOIN competitor_event AS T3 ON T2.id = T3.event_id INNER JOIN games_competitor AS T4 ON T3.competitor_id = T4.id INNER JOIN person AS T5 ON T4.person_id = T5.id WHERE T5.full_name = 'John Aalberg' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many Belgian men have competed in an Olympic Games? | SELECT COUNT(T2.person_id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Belgium' AND T3.gender = 'M' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many athletes took part in the Olympic games held in Barcelona? | SELECT COUNT(T1.person_id) FROM games_competitor AS T1 INNER JOIN games_city AS T2 ON T1.games_id = T2.games_id INNER JOIN city AS T3 ON T2.city_id = T3.id WHERE T3.city_name = 'Barcelona' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many different football events are there? | SELECT COUNT(T2.event_name) FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Football' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What were the cities in which John Aalberg competed? | SELECT T4.city_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T1.full_name = 'John Aalberg' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | In Barcelona, how many Olympic games were held? | SELECT COUNT(T1.games_id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'Barcelona' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many competitors over the age of 30 participated in the 1992 Winter Olympics? | SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '1992 Winter' AND T2.age > 30 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the name of the Olympic game with the most competitors held in Barcelona? | SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T4.city_name = 'Barcelona' GROUP BY T1.id ORDER BY COUNT(T2.person_id) DESC LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | List the name of competitors from Argentina. | SELECT T3.full_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Argentina' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the average age of Argentina's athletes who participated in the Summer Olympics in 2012? | SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person_region AS T3 ON T2.person_id = T3.person_id INNER JOIN noc_region AS T4 ON T3.region_id = T4.id WHERE T1.games_name = '2012 Summer' AND T4.region_name = 'Argentina' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Calculate the percentage of bronze medals won by men's basketball players. | SELECT CAST(COUNT(CASE WHEN T4.medal_name = 'Bronze' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id INNER JOIN medal AS T4 ON T1.medal_id = T4.id WHERE T3.event_name LIKE 'Basketball Men%s Basketball' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | List the name of the games that Georgios Abaris participated. | SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Georgios Abaris' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Provide the name of competitors from Greece. | SELECT T3.full_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Greece' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Calculate the average age of the competitors who participated in the 1924 Winter. | SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '1924 Winter' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the NOC code of the region of the competitors weighted 77 kg? | SELECT T1.noc FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.weight = 77 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | List the names of the games held in Paris. | SELECT T3.games_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'Paris' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Provide the competitors' names who joined the 2000 Summer. | SELECT T3.full_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2000 Summer' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | In which city was the game held where the oldest competitor participated? | SELECT T4.city_name FROM games_competitor AS T1 INNER JOIN games AS T2 ON T1.games_id = T2.id INNER JOIN games_city AS T3 ON T1.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id ORDER BY T1.age DESC LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the name of the youngest competitor? | SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id ORDER BY T2.age LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | List down the games ID of games held in Tokyo. | SELECT T1.games_id FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'Tokyo' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Give the NOC code and region name of the heaviest competitor. | SELECT T1.noc, T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id ORDER BY T3.weight DESC LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | In what year and season did Sohail Abbas compete? | SELECT T1.games_year, T1.season FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Sohail Abbas' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the average weight of the competitors who won a silver medal? | SELECT AVG(T1.weight) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.medal_name = 'Silver' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | In which city the 2004 Summer was held? | SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '2004 Summer' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | What is the season of the game where a competitor who weighted 73 kg and 180 cm tall, participated? | SELECT DISTINCT T1.season FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.height = 180 AND T3.weight = 73 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Provide the names of competitors who received a gold medal. | SELECT DISTINCT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.medal_name = 'Gold' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Compute the average height of competitors whose age ranges from 22 to 28. | SELECT AVG(T1.height) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.age BETWEEN 22 AND 28 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | How many female competitors were from Iran? | SELECT COUNT(T2.person_id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Iran' AND T3.gender = 'F' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Provide the age of the tallest competitor. | SELECT T2.age FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id ORDER BY T1.height DESC LIMIT 1 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Among the competitors with age ranges 24 and below, calculate the difference between the number of competitors who weighed greater than 70 kg and competitors who weighted less than 70 kg. | SELECT COUNT(CASE WHEN T1.weight > 70 THEN 1 ELSE NULL END) - COUNT(CASE WHEN T1.weight < 70 THEN 1 ELSE NULL END) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.age < 24 | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | In the 2014 Winter game, what is the percentage of competitors who age 28 years old? | SELECT CAST(COUNT(CASE WHEN T2.age = 28 THEN 1 END) AS REAL) * 100 / COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2014 Winter' | bird |
CREATE TABLE olympics (id integer, city_name text, id integer, games_year integer, games_name text, season text, games_id integer, city_id integer, id integer, medal_name text, id integer, noc text, region_name text, id integer, full_name text, gender text, height integer, weight integer, id integer, games_id integer, person_id integer, age integer, person_id integer, region_id integer, id integer, sport_name text, id integer, sport_id integer, event_name text, event_id integer, competitor_id integer, medal_id integer) | Among the males, list the region name of people with height greater than 87% of the average height of all people listed. | SELECT DISTINCT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.gender = 'M' AND T3.height * 100 > ( SELECT AVG(height) FROM person WHERE gender = 'M' ) * 87 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | What is the total number of households in Arecibo county? | SELECT SUM(T1.households) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Which residential area in Arecibo county has the highest average house value? Please give its zip_code. | SELECT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' ORDER BY T1.avg_house_value DESC LIMIT 1 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Please list the numbers of males in all the residential areas in Arecibo county. | 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 = 'ARECIBO' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Among all the residential areas in Delaware, how many of them implement daylight saving? | SELECT COUNT(T1.zip_code) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'DELAWARE' AND T1.daylight_savings = 'Yes' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Among all the residential areas in Arecibo county, what is the zip_code of the one with the highest white population? | SELECT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' ORDER BY T1.white_population DESC LIMIT 1 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | In which county is the residential area with the highest average income per household located? | SELECT T2.county FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' GROUP BY T2.county ORDER BY T1.avg_income_per_household DESC LIMIT 1 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Please list the names of all the counties with at least one residential area that implements daylight saving. | SELECT DISTINCT T2.county FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.daylight_savings = 'Yes' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Please list the zip_codes of all the residential areas in Huntingdon county with over 30 employees. | SELECT DISTINCT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'HUNTINGDON' AND T1.employees > 30 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Please list the Asian populations of all the residential areas with the bad alias "URB San Joaquin". | SELECT SUM(T1.asian_population) FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T2.bad_alias = 'URB San Joaquin' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Among the residential areas with the bad alias "Internal Revenue Service", how many of them are in the Eastern time zone? | SELECT COUNT(T1.zip_code) FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T2.bad_alias = 'Internal Revenue Service' AND T1.time_zone = 'Eastern' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | What is the bad alias of the residential area with the highest average house value? | SELECT T2.bad_alias FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T1.avg_house_value = ( SELECT MAX(avg_house_value) FROM zip_data ) LIMIT 1 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | Please list the bad alias of all the residential areas with a median female age of over 32. | SELECT DISTINCT T2.bad_alias FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T1.female_median_age > 32 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | What is the highest gender ratio of the residential areas in Arecibo county? | SELECT CAST(T1.male_population AS REAL) / T1.female_population FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' AND T1.female_population <> 0 ORDER BY 1 DESC LIMIT 1 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | What is the average median female age of all the residential areas in the Arecibo county? | SELECT SUM(T1.female_median_age) / COUNT(T1.zip_code) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | What is the area code of the city with the female median age over 32 years old? | SELECT T1.area_code FROM area_code AS T1 INNER JOIN ZIP_Data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.female_median_age > 32 GROUP BY T1.area_code | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | What is the alias of the city called Hartford? | SELECT DISTINCT T2.alias FROM zip_data AS T1 INNER JOIN alias AS T2 ON T1.zip_code = T2.zip_code WHERE T1.city = 'Hartford' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | How many counties are there in Alabama? | SELECT COUNT(T2.county) FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Alabama' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | How many post offices are there in New York? | SELECT COUNT(DISTINCT T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.abbreviation = 'NY' AND T2.type = 'Post Office' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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' | bird |
CREATE TABLE address (CBSA integer, CBSA_name text, CBSA_type text, abbreviation text, name text, cognress_rep_id text, first_name text, last_name text, CID text, party text, state text, abbreviation text, House text, District integer, land_area real, zip_code integer, city text, state text, multi_county text, type text, organization text, time_zone text, daylight_savings text, latitude real, longitude real, elevation integer, state_fips integer, county_fips integer, region text, division text, population_2020 integer, population_2010 integer, households integer, avg_house_value integer, avg_income_per_household integer, persons_per_household real, white_population integer, black_population integer, hispanic_population integer, asian_population integer, american_indian_population integer, hawaiian_population integer, other_population integer, male_population integer, female_population integer, median_age real, male_median_age real, female_median_age real, residential_mailboxes integer, business_mailboxes integer, total_delivery_receptacles integer, businesses integer, 1st_quarter_payroll integer, annual_payroll integer, employees integer, water_area real, land_area real, single_family_delivery_units integer, multi_family_delivery_units integer, total_beneficiaries integer, retired_workers integer, disabled_workers integer, parents_and_widowed integer, spouses integer, children integer, over_65 integer, monthly_benefits_all integer, monthly_benefits_retired_workers integer, monthly_benefits_widowed integer, CBSA integer, zip_code integer, alias text, zip_code integer, area_code integer, zip_code integer, bad_alias text, zip_code integer, county text, state text, zip_code integer, district text) | 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 | bird |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.