db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
olympics | select sport_name from sport where id = 19 | Question: state the name of sport id 19. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. person_r... | state the name of sport id 19. |
olympics | select id from event where event_name = 'shooting mixed skeet' | Question: give the id of the event 'shooting mixed skeet'. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person... | give the id of the event 'shooting mixed skeet'. |
olympics | select id from sport where sport_name = 'hockey' | Question: provide hockey's sport id. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. person_regio... | provide hockey's sport id. |
olympics | select weight from person where full_name = 'dagfinn sverre aarskog' | Question: tell the weight of dagfinn sverre aarskog. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, a... | tell the weight of dagfinn sverre aarskog. |
olympics | select id from city where city_name = 'rio de janeiro' | Question: what is the id of rio de janeiro? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. perso... | what is the id of rio de janeiro? |
olympics | select count(t1.competitor_id) from competitor_event as t1 inner join event as t2 on t1.event_id = t2.id inner join medal as t3 on t1.medal_id = t3.id where t2.event_name like 'rowing women%s coxed eights' and t3.medal_name = 'gold' | Question: how many people have won the gold medal of the event 'rowing women's coxed eights'? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games... | how many people have won the gold medal of the event 'rowing women's coxed eights'? |
olympics | select count(t2.event_name) from sport as t1 inner join event as t2 on t1.id = t2.sport_id where t1.sport_name = 'cycling' | Question: how many kinds of events belong to the sport of cycling? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id... | how many kinds of events belong to the sport of cycling? |
olympics | select 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.full_name = 'vijay singh chauhan' | Question: what is vijay singh chauhan's region name? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, a... | what is vijay singh chauhan's region name? |
olympics | select t3.games_year 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 = 'roma' | Question: when did roma host the olympic games? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. p... | when did roma host the olympic games? |
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 = '1984 summer' and t2.age = 20 | Question: how many 20 years old athletes were there in the 1984 summer olympic games? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competi... | how many 20 years old athletes were there in the 1984 summer olympic games? |
olympics | select count(t2.games_id) from person as t1 inner join games_competitor as t2 on t1.id = t2.person_id where t1.full_name = 'prithipal singh' | Question: how many games has prithipal singh participated in? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, per... | how many games has prithipal singh participated in? |
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 = '1984 summer' and t2.age > 50 | Question: state the number of athletes in the 1984 summer olympic games who were more than 50 years old. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, we... | state the number of athletes in the 1984 summer olympic games who were more than 50 years old. |
olympics | select count(t2.event_name) from sport as t1 inner join event as t2 on t1.id = t2.sport_id where t1.sport_name = 'athletics' | Question: how many kinds of events does athletics have? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id... | how many kinds of events does athletics have? |
olympics | 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 = 'russia' order by t3.weight desc limit 1 | Question: who is the heaviest athlete from russia? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age... | who is the heaviest athlete from russia? |
olympics | select t3.height 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 = 'portugal' order by t3.height desc limit 1 | Question: give the height of the tallest athlete from portugal. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, p... | give the height of the tallest athlete from portugal. |
olympics | 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 = '1968 winter' | Question: tell the host city of the 1968 winter olympic games. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, pe... | tell the host city of the 1968 winter olympic games. |
olympics | 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 | Question: which region has the most athletes? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. per... | which region has the most athletes? |
olympics | select cast(count(case when t3.height > 175 then 1 else null end) as real) * 100 / 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 = 'vanuatu' | Question: what is the percentage of athletes from vanuatu who are taller than 175? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor... | what is the percentage of athletes from vanuatu who are taller than 175? |
olympics | select avg(t3.weight) 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 = 'tonga' and t3.gender = 'm' | Question: calculate the average weight of male athletes from tonga. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_i... | calculate the average weight of male athletes from tonga. |
olympics | 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 = '1920 summer' | Question: where was the 1920 summer held? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. person_... | where was the 1920 summer held? |
olympics | select count(t3.id) 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 = 'london' and t3.games_year between 1900 and 1992 | Question: from 1900 to 1992, how many games did london host? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, pers... | from 1900 to 1992, how many games did london host? |
olympics | select count(t3.id) 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' and t3.season = 'summer' | Question: how many summer games are there that were held in paris? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id... | how many summer games are there that were held in paris? |
olympics | 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 = 'los angeles' | Question: please list all game names that were held in los angeles. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_i... | please list all game names that were held in los angeles. |
olympics | select t2.city_name from games_city as t1 inner join city as t2 on t1.city_id = t2.id group by t2.city_name order by count(t2.city_name) desc limit 1 | Question: which city hosted the most games? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. perso... | which city hosted the most games? |
olympics | 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 = 'beijing' and t3.games_year = 2008 | Question: what is the game name that was held in beijing in 2008? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id,... | what is the game name that was held in beijing in 2008? |
olympics | select cast(count(case when t2.age > 30 then 1 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 where t1.medal_id = 1 | Question: what is the percentage of champions at the age of over 30? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_... | what is the percentage of champions at the age of over 30? |
olympics | 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' | Question: at which age did a lamusi participate in 2012 summer? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, p... | at which age did a lamusi participate in 2012 summer? |
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 = '2000 summer' and t2.age = 31 | Question: how many competitors were there who participated in 2000 summer with age 31? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_compet... | how many competitors were there who participated in 2000 summer with age 31? |
olympics | 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' | Question: how many male competitors were there who participated in 1948 summer? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor ->... | how many male competitors were there who participated in 1948 summer? |
olympics | 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' | Question: please list all competitors' names who participated in 1936 summer. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> i... | please list all competitors' names who participated in 1936 summer. |
olympics | 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 | Question: who is the youngest competitor that participated in 2014 winter? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, ... | who is the youngest competitor that participated in 2014 winter? |
olympics | 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' | Question: what is the average age of competitors who participated in 1988 winter? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor ... | what is the average age of competitors who participated in 1988 winter? |
olympics | 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 | Question: what is the percentage of female competitors whose heights are over 170 that participated in the game in 1988? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, ge... | what is the percentage of female competitors whose heights are over 170 that participated in the game in 1988? |
olympics | 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' | Question: what is the sport name of 'cross country skiing men's 10/15 kilometres pursuit' event? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. ga... | what is the sport name of 'cross country skiing men's 10/15 kilometres pursuit' event? |
olympics | 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 | Question: what is the percentage of people whose age greater than 24 and participate in winter season? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weig... | what is the percentage of people whose age greater than 24 and participate in winter season? |
olympics | 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' | Question: what is the region id of christine jacoba aaftink? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, pers... | what is the region id of christine jacoba aaftink? |
olympics | select t2.height from person_region as t1 inner join person as t2 on t1.person_id = t2.id where t1.region_id = 7 | Question: mention the height of people who belong to region id 7. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id,... | mention the height of people who belong to region id 7. |
olympics | 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 | Question: state the name of the city that held game id 3. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_... | state the name of the city that held game id 3. |
olympics | 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' | Question: what are the id of the games held in london? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id,... | what are the id of the games held in london? |
olympics | 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 | Question: how many people who are below 30 and participated in the summer season? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor ... | how many people who are below 30 and participated in the summer season? |
olympics | 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 | Question: list out the name of the game that the people participated in games id 13. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competit... | list out the name of the game that the people participated in games id 13. |
olympics | select avg(t2.age) from games as t1 inner join games_competitor as t2 on t1.id = t2.games_id where t1.season = 'winter' | Question: what is the average age of the people who participated in the winter season? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_compet... | what is the average age of the people who participated in the winter season? |
olympics | 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' | Question: what is the percentage of the people who are under 35 and participated in the summer season? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weig... | what is the percentage of the people who are under 35 and participated in the summer season? |
olympics | select t2.event_name from sport as t1 inner join event as t2 on t1.id = t2.sport_id where t1.sport_name = 'basketball' | Question: state the event name of basketball. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. per... | state the event name of basketball. |
olympics | 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 | Question: what is the name of medal that competitor id 9 obtained? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id... | what is the name of medal that competitor id 9 obtained? |
olympics | 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' | Question: list out the id of event that achieve the gold medal. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, p... | list out the id of event that achieve the gold medal. |
olympics | select full_name from person order by weight desc limit 1 | Question: who is the heaviest athlete? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age. person_reg... | who is the heaviest athlete? |
olympics | 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 | Question: which city were the olympic games held in 1992? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_... | which city were the olympic games held in 1992? |
olympics | 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 | Question: which region is the majority of the athletes from? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, pers... | which region is the majority of the athletes from? |
olympics | 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 | Question: what is the name of the oldest competitor? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, a... | what is the name of the oldest competitor? |
olympics | 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' | Question: which sport did john aalberg participate in? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id,... | which sport did john aalberg participate in? |
olympics | 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' | Question: how many belgian men have competed in an olympic games? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id,... | how many belgian men have competed in an olympic games? |
olympics | 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' | Question: how many athletes took part in the olympic games held in barcelona? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> i... | how many athletes took part in the olympic games held in barcelona? |
olympics | 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' | Question: how many different football events are there? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id... | how many different football events are there? |
olympics | 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' | Question: what were the cities in which john aalberg competed? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, pe... | what were the cities in which john aalberg competed? |
olympics | 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' | Question: in barcelona, how many olympic games were held? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_... | in barcelona, how many olympic games were held? |
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 | Question: how many competitors over the age of 30 participated in the 1992 winter olympics? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_c... | how many competitors over the age of 30 participated in the 1992 winter olympics? |
olympics | 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 | Question: what is the name of the olympic game with the most competitors held in barcelona? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_c... | what is the name of the olympic game with the most competitors held in barcelona? |
olympics | 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' | Question: list the name of competitors from argentina. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id,... | list the name of competitors from argentina. |
olympics | 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' | Question: what is the average age of argentina's athletes who participated in the summer olympics in 2012? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, ... | what is the average age of argentina's athletes who participated in the summer olympics in 2012? |
olympics | 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 '... | Question: calculate the percentage of bronze medals won by men's basketball players. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competit... | calculate the percentage of bronze medals won by men's basketball players. |
olympics | 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' | Question: list the name of the games that georgios abaris participated. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, gam... | list the name of the games that georgios abaris participated. |
olympics | 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' | Question: provide the name of competitors from greece. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id,... | provide the name of competitors from greece. |
olympics | 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' | Question: calculate the average age of the competitors who participated in the 1924 winter. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_c... | calculate the average age of the competitors who participated in the 1924 winter. |
olympics | 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 | Question: what is the noc code of the region of the competitors weighted 77 kg? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor ->... | what is the noc code of the region of the competitors weighted 77 kg? |
olympics | 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' | Question: list the names of the games held in paris. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, a... | list the names of the games held in paris. |
olympics | 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' | Question: provide the competitors' names who joined the 2000 summer. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_... | provide the competitors' names who joined the 2000 summer. |
olympics | 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 | Question: in which city was the game held where the oldest competitor participated? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competito... | in which city was the game held where the oldest competitor participated? |
olympics | 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 | Question: what is the name of the youngest competitor? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id,... | what is the name of the youngest competitor? |
olympics | 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' | Question: list down the games id of games held in tokyo. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_i... | list down the games id of games held in tokyo. |
olympics | 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 | Question: give the noc code and region name of the heaviest competitor. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, gam... | give the noc code and region name of the heaviest competitor. |
olympics | 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' | Question: in what year and season did sohail abbas compete? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, perso... | in what year and season did sohail abbas compete? |
olympics | 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' | Question: what is the average weight of the competitors who won a silver medal? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor ->... | what is the average weight of the competitors who won a silver medal? |
olympics | 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' | Question: in which city the 2004 summer was held? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, age.... | in which city the 2004 summer was held? |
olympics | 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 | Question: what is the season of the game where a competitor who weighted 73 kg and 180 cm tall, participated? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, heigh... | what is the season of the game where a competitor who weighted 73 kg and 180 cm tall, participated? |
olympics | 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' | Question: provide the names of competitors who received a gold medal. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games... | provide the names of competitors who received a gold medal. |
olympics | 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 | Question: compute the average height of competitors whose age ranges from 22 to 28. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competito... | compute the average height of competitors whose age ranges from 22 to 28. |
olympics | 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' | Question: how many female competitors were from iran? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, ... | how many female competitors were from iran? |
olympics | 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 | Question: provide the age of the tallest competitor. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. games_competitor -> id, games_id, person_id, a... | provide the age of the tallest competitor. |
olympics | 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 | Question: 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. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id... | 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. |
olympics | 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' | Question: in the 2014 winter game, what is the percentage of competitors who age 28 years old? | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, full_name, gender, height, weight. game... | in the 2014 winter game, what is the percentage of competitors who age 28 years old? |
olympics | 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 | Question: among the males, list the region name of people with height greater than 87% of the average height of all people listed. | Tables: city -> id, city_name. games -> id, games_year, games_name, season. games_city -> games_id, city_id. medal -> id, medal_name. noc_region -> id, noc, region_name. person -> id, ful... | among the males, list the region name of people with height greater than 87% of the average height of all people listed. |
address | 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' | Question: what is the total number of households in arecibo county? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organizat... | what is the total number of households in arecibo county? |
address | 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 | Question: which residential area in arecibo county has the highest average house value? please give its zip_code. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_co... | which residential area in arecibo county has the highest average house value? please give its zip_code. |
address | select sum(t1.male_population) from zip_data as t1 inner join country as t2 on t1.zip_code = t2.zip_code where t2.county = 'arecibo' | Question: please list the numbers of males in all the residential areas in arecibo county. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_... | please list the numbers of males in all the residential areas in arecibo county. |
address | 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' | Question: among all the residential areas in delaware, how many of them implement daylight saving? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state... | among all the residential areas in delaware, how many of them implement daylight saving? |
address | 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 | Question: among all the residential areas in arecibo county, what is the zip_code of the one with the highest white population? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_... | among all the residential areas in arecibo county, what is the zip_code of the one with the highest white population? |
address | 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 | Question: in which county is the residential area with the highest average income per household located? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city,... | in which county is the residential area with the highest average income per household located? |
address | 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' | Question: please list the names of all the counties with at least one residential area that implements daylight saving. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> ... | please list the names of all the counties with at least one residential area that implements daylight saving. |
address | 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 | Question: please list the zip_codes of all the residential areas in huntingdon county with over 30 employees. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, ... | please list the zip_codes of all the residential areas in huntingdon county with over 30 employees. |
address | 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' | Question: please list the asian populations of all the residential areas with the bad alias 'urb san joaquin'. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code,... | please list the asian populations of all the residential areas with the bad alias 'urb san joaquin'. |
address | 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' | Question: among the residential areas with the bad alias 'internal revenue service', how many of them are in the eastern time zone? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. ... | among the residential areas with the bad alias 'internal revenue service', how many of them are in the eastern time zone? |
address | 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 | Question: what is the bad alias of the residential area with the highest average house value? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, mul... | what is the bad alias of the residential area with the highest average house value? |
address | 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 | Question: please list the bad alias of all the residential areas with a median female age of over 32. | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, st... | please list the bad alias of all the residential areas with a median female age of over 32. |
address | 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 | Question: what is the highest gender ratio of the residential areas in arecibo county? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_coun... | what is the highest gender ratio of the residential areas in arecibo county? |
address | 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' | Question: what is the average median female age of all the residential areas in the arecibo county? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, stat... | what is the average median female age of all the residential areas in the arecibo county? |
address | select t1.area_code from area_code as t1 inner join zip_data as t2 on t1.zip_code = t2.zip_code where t2.female_median_age > 32 group by t1.area_code | Question: what is the area code of the city with the female median age over 32 years old? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_c... | what is the area code of the city with the female median age over 32 years old? |
address | 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' | Question: what is the alias of the city called hartford? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_z... | what is the alias of the city called hartford? |
address | select count(t2.county) from state as t1 inner join country as t2 on t1.abbreviation = t2.state where t1.name = 'alabama' | Question: how many counties are there in alabama? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zone, da... | how many counties are there in alabama? |
address | 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' | Question: how many post offices are there in new york? | Tables: CBSA -> CBSA, CBSA_name, CBSA_type. state -> abbreviation, name. congress -> cognress_rep_id, first_name, last_name, CID, party, state, abbreviation, House, District, land_area. zip_data -> zip_code, city, state, multi_county, type, organization, time_zon... | how many post offices are there in new york? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.