db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
legislator | select case when sum(case when t1.official_full_name = 'maria cantwell' then 1 else 0 end) > sum(case when t1.official_full_name = 'sherrod brown' then 1 else 0 end) then 'maria cantwell' else 'sherrod brown' end from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide | Question: which current legislator has served for more terms, sherrod brown or maria cantwell? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_nam... | which current legislator has served for more terms, sherrod brown or maria cantwell? |
legislator | select cast(sum(case when gender_bio = 'f' then 1 else 0 end) as real) * 100 / count(t3.bioguide) from ( select t2.bioguide, t1.gender_bio from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide group by t2.bioguide having count(t2.bioguide) > 4 ) t3 | Question: among all the current legislators who have served for more than 4 terms, what is the percentage of them being female? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, mapli... | among all the current legislators who have served for more than 4 terms, what is the percentage of them being female? |
legislator | select cast(count(t2.bioguide) as real) / count(distinct t1.bioguide_id) from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.wikipedia_id is not null | Question: what is the average number of terms served for a current legislator that's famous or impact? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nick... | what is the average number of terms served for a current legislator that's famous or impact? |
legislator | select count(gender_bio) from current where gender_bio = 'f' | Question: how many of the legislators are female? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecrets_id, religi... | how many of the legislators are female? |
legislator | select count(type) from `historical-terms` where state = 'nj' and type = 'rep' | Question: what is the total number of senators new jersey have? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensecr... | what is the total number of senators new jersey have? |
legislator | select address from `current-terms` where contact_form = 'http://www.carper.senate.gov/contact/' | Question: provide the address of the legislator with the contact form of http://www.carper.senate.gov/contact/. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_n... | provide the address of the legislator with the contact form of http://www.carper.senate.gov/contact/. |
legislator | select t1.instagram from `social-media` as t1 inner join current as t2 on t2.bioguide_id = t1.bioguide where t2.first_name = 'benjamin' and t2.last_name = 'hawkins' | Question: provide the instagram username of the legislator named benjamin hawkins. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_... | provide the instagram username of the legislator named benjamin hawkins. |
legislator | select t1.bioguide from `current-terms` as t1 inner join current as t2 on t2.bioguide_id = t1.bioguide where t2.religion_bio = 'catholic' and t1.state = 'ne' | Question: give the alphanumeric id of the catholic legislators in nebraska. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_na... | give the alphanumeric id of the catholic legislators in nebraska. |
legislator | select t1.maplight_id from historical as t1 inner join `historical-terms` as t2 on t1.bioguide_id = t2.bioguide where t2.type = 'rep' and t2.state = 'me' group by t1.maplight_id | Question: list down the maplight id of the representatives in maine. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, ope... | list down the maplight id of the representatives in maine. |
legislator | select t2.type, t2.start from historical as t1 inner join `historical-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.birthday_bio = '1727-11-26' | Question: give the type and start date of the term of the legislator born on november 26, 1727. | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_na... | give the type and start date of the term of the legislator born on november 26, 1727. |
legislator | select t2.contact_form from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t1.official_full_name = 'rick crawford' | Question: what is the contact form of the legislator named rick crawford? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name... | what is the contact form of the legislator named rick crawford? |
legislator | select count(t.bioguide_id) from ( select t1.bioguide_id from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t2.type = 'rep' and t2.state = 'mi' and t1.gender_bio = 'f' group by t1.bioguide_id ) t | Question: how many female representatives are there in michigan? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, official_full_name, opensec... | how many female representatives are there in michigan? |
legislator | select cast(sum(case when t2.type = 'sen' then 1 else 0 end) as real) * 100 / count(t2.type) from current as t1 inner join `current-terms` as t2 on t1.bioguide_id = t2.bioguide where t2.state = 'me' and t1.gender_bio = 'f' | Question: among the female legislators, what is the percentage of the senators in maine? | Tables: current -> ballotpedia_id, bioguide_id, birthday_bio, cspan_id, fec_id, first_name, gender_bio, google_entity_id_id, govtrack_id, house_history_id, icpsr_id, last_name, lis_id, maplight_id, middle_name, nickname_name, off... | among the female legislators, what is the percentage of the senators in maine? |
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 = 'john aalberg' | Question: please list the names of all the olympic games that john aalberg has taken part 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... | please list the names of all the olympic games that john aalberg has taken part in. |
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 = 'john aalberg' and t2.age = 31 | Question: what was the name of the olympic game that john aalberg took part in when he was 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. game... | what was the name of the olympic game that john aalberg took part in when he was 31? |
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 t3.full_name = 'john aalberg' and t1.games_name = '1994 winter' | Question: when john aalberg took part in the 1994 winter olympic game, how old was he? | 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... | when john aalberg took part in the 1994 winter olympic game, how old was he? |
olympics | select count(t1.person_id) from person_region as t1 inner join noc_region as t2 on t1.region_id = t2.id where t2.region_name = 'finland' | Question: how many olympic competitors are from finland? | 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... | how many olympic competitors are from finland? |
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 = 'finland' | Question: please list the names of all the olympic competitors from finland. | 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... | please list the names of all the olympic competitors from finland. |
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 = 'john aalberg' | Question: the olympic competitor john aalberg is from which region? | 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... | the olympic competitor john aalberg is from which region? |
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.gender = 'm' order by t3.height desc limit 1 | Question: what is the noc code of the region where the tallest male olympic competitor is 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. gam... | what is the noc code of the region where the tallest male olympic competitor is from? |
olympics | select count(t3.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 = 'finland' and t3.gender = 'f' | Question: among all the olympic competitors from finland, how many of them are female? | 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... | among all the olympic competitors from finland, how many of them are female? |
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 = '1992 summer' | Question: in which city was the 1992 summer olympic games 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, p... | in which city was the 1992 summer olympic games held? |
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 = 'london' | Question: please list the names of the olympic games that were 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 -> ... | please list the names of the olympic games that were held in london. |
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 = 'london' order by t3.games_year limit 1 | Question: in which year did london hold its earliest olympic game? | 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... | in which year did london hold its earliest olympic game? |
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 = 'london' | Question: for how many times has london held 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, p... | for how many times has london held the olympic games? |
olympics | select avg(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 = 'finland' and t3.gender = 'm' | Question: what is the average height of the male olympic competitors from finland? | 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 height of the male olympic competitors from finland? |
olympics | select cast(count(case when t5.region_name = 'finland' then 1 else null end) as real) * 100 / count(t3.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 inner join person_region as t4 on t3.id = t4.person_id inner join noc_region as t5 on t4.re... | Question: among the competitors of the 1994 winter olympic game, what is the percentage of those from finland? | 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, heig... | among the competitors of the 1994 winter olympic game, what is the percentage of those from finland? |
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 'shooting women%s trap' | Question: which sport does the event 'shooting women's trap' belong to? | 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... | which sport does the event 'shooting women's trap' belong to? |
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 = '1936 winter' | Question: which city was the host of 1936 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, p... | which city was the host of 1936 winter olympic games? |
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' | Question: how many olympic games has london hosted? | 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, ag... | how many olympic games has london hosted? |
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 = 'swimming' | Question: tell the number of swimming related events. | 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, ... | tell the number of swimming related events. |
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 = 'peter kohnke' | Question: for peter kohnke, show the name of his/her region. | 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... | for peter kohnke, show the name of his/her region. |
olympics | select t2.games_id from person as t1 inner join games_competitor as t2 on t1.id = t2.person_id where t1.full_name = 'jessica carolina aguilera aguilera' | Question: which game has jessica carolina aguilera aguilera participated in? give the id of the game. | 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, weigh... | which game has jessica carolina aguilera aguilera participated in? give the id of the game. |
olympics | select t1.sport_name from sport as t1 inner join event as t2 on t1.id = t2.sport_id group by t1.sport_name order by count(t2.event_name) desc limit 1 | Question: show the name of the sport with the most events. | 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... | show the name of the sport with the most events. |
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 = 'sweden' order by t3.height desc limit 1 | Question: give the name of the tallest athlete from sweden. | 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... | give the name of the tallest athlete from sweden. |
olympics | select count(t1.person_id) from person_region as t1 inner join noc_region as t2 on t1.region_id = t2.id where t2.region_name = 'guatemala' | Question: how many athletes in the database are from guatemala? | 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... | how many athletes in the database are from guatemala? |
olympics | select t1.full_name from person as t1 inner join games_competitor as t2 on t1.id = t2.person_id group by t2.person_id order by count(t2.person_id) desc limit 1 | Question: who has participated in the most olympic games in the database? | 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, g... | who has participated in the most olympic games in the database? |
olympics | select t1.full_name from person as t1 inner join games_competitor as t2 on t1.id = t2.person_id where t2.id = 90991 | Question: show the name of the competitor id 90991. | 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, ag... | show the name of the competitor id 90991. |
olympics | select count(t2.id) from person as t1 inner join games_competitor as t2 on t1.id = t2.person_id where t1.full_name = 'martina kohlov' | Question: how many competitor ids does martina kohlov 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, perso... | how many competitor ids does martina kohlov have? |
olympics | select cast(t1.weight as real) / (t1.height * t1.height) from person as t1 inner join games_competitor as t2 on t1.id = t2.person_id where t2.id = 147420 | Question: calculate the bmi of the competitor id 147420. | 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... | calculate the bmi of the competitor id 147420. |
olympics | select cast(count(case when t3.gender = 'm' 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 = 'estonia' | Question: what is the percentage of male athletes from estonia? | 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... | what is the percentage of male athletes from estonia? |
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: who is the youngest person who participated in the 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_competitor -> id, game... | who is the youngest person who participated in the olympics? |
olympics | select 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 where t3.event_name like 'basketball men%s basketball' and t2.age = 24 | Question: how many 24 years old competitors competed in men's 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, g... | how many 24 years old competitors competed in men's basketball? |
olympics | select t2.event_name from sport as t1 inner join event as t2 on t1.id = t2.sport_id where t1.sport_name = 'art competitions' | Question: what are the names of the events under art competitions? | 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 are the names of the events under art competitions? |
olympics | select count(t1.id) 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 t1.full_name = 'henk jan zwolle' and t4.medal_name = 'gold' | Question: how many gold medals does henk jan zwolle 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_... | how many gold medals does henk jan zwolle have? |
olympics | select t2.event_name 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 t3.medal_name = 'gold' group by t2.id order by count(t1.event_id) desc limit 1 | Question: what is the name of the event where competitors received the most gold medals? | 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_comp... | what is the name of the event where competitors received the most gold medals? |
olympics | select count(t2.person_id) from noc_region as t1 inner join person_region as t2 on t1.id = t2.region_id where t1.region_name = 'australia' | Question: how many athletes are from australia? | 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... | how many athletes are from australia? |
olympics | select t2.city_name from games_city as t1 inner join city as t2 on t1.city_id = t2.id group by t2.id having count(t1.games_id) >= 3 | Question: which cities hosted at least 3 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... | which cities hosted at least 3 olympic games? |
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 = 'stockholm' and t3.season = 'summer' | Question: how many summer games were held in stockholm? | 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 summer games were held in stockholm? |
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 do most of the athletes are 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, person_i... | which region do most of the athletes are from? |
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 order by t3.games_year limit 1 | Question: where was the first olympic game 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. ... | where was the first olympic game held? |
olympics | select t1.games_name from games as t1 inner join games_competitor as t2 on t1.id = t2.games_id order by t2.age limit 1 | Question: what is the name of the game in which the oldest olympian has ever 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_co... | what is the name of the game in which the oldest olympian has ever participated? |
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 = '1928 summer' | Question: how many athletes competed in the 1992 summer 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_competitor -> id, games_id,... | how many athletes competed in the 1992 summer olympics? |
olympics | select count(t3.event_id) , cast(count(case when t4.id = '1' then 1 else null end) as real) * 100 / count(t4.id) 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 t1.full_name = 'm... | Question: how many olympic events did michael phelps ii join in total? find the percentage of the events where he won 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, fu... | how many olympic events did michael phelps ii join in total? find the percentage of the events where he won a gold medal. |
olympics | select p1 , ( select max(p2) - min(p2) from ( select count(t2.person_id) as p2 from games as t1 inner join games_competitor as t2 on t1.id = t2.games_id where t1.games_name in ('1988 winter', '1988 summer') group by t1.season ) order by p2 desc limit 1 ) from ( select t1.season as p1, count(t2.person_id) as p2 from gam... | Question: in the winter and summer olympics of 1988, which game has the most number of competitors? find the difference of the number of competitors between the two 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 -... | in the winter and summer olympics of 1988, which game has the most number of competitors? find the difference of the number of competitors between the two games. |
olympics | select age from games_competitor group by age order by count(person_id) desc limit 1 | Question: what age of the competitors is the most numerous? | 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... | what age of the competitors is the most numerous? |
olympics | select city_name from city where city_name like 'm%' | Question: in which cities beginning with the letter m have the olympic games been 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_compe... | in which cities beginning with the letter m have the olympic games been held? |
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 in ('1976 summer', '1976 winter') | Question: in which cities were the 1976 winter and summer games 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... | in which cities were the 1976 winter and summer games held? |
olympics | select t4.medal_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 t1.full_name = 'coleen dufresne (-stewner)' | Question: what was the medal that coleen dufresne got? | 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 was the medal that coleen dufresne got? |
olympics | select 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.id != 4 group by t1.full_name order by count(t4.id) desc limit 1 | Question: what is the name of the competitor who has won the most medals? | 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, g... | what is the name of the competitor who has won the most medals? |
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 = 'estelle nze minko' | Question: where is competitor estelle nze minko 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, person_id, ... | where is competitor estelle nze minko from? |
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 = 'chin eei hui' | Question: what is the name of all the sports chin eei hui has competed 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, ... | what is the name of all the sports chin eei hui has competed in? |
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 person who participated in 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_compet... | what is the name of the oldest person who participated in the olympic games? |
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.gender = 'f' group by t1.games_name order by count(t2.person_id) desc limit 1 | Question: in which olympic games have the largest number of women participation? | 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 -... | in which olympic games have the largest number of women participation? |
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 males from belgium have participated 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... | how many males from belgium have participated 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 = 'sapporo' | Question: how many persons participated in the sapporo 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_competitor -> id, games_id, ... | how many persons participated in the sapporo olympics? |
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 = 'morten aleksander djupvik' | Question: in which olympic games has morten aleksander djupvik 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... | in which olympic games has morten aleksander djupvik participated? |
olympics | select count(t1.competitor_id) from competitor_event as t1 inner join event as t2 on t1.event_id = t2.id inner join sport as t3 on t2.sport_id = t3.id where t2.event_name = 'sailing mixed 12 metres' | Question: how many persons in total have participated in 12 meter mixed sailing competitions? | 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 persons in total have participated in 12 meter mixed sailing competitions? |
olympics | select count(distinct t2.event_name) from sport as t1 inner join event as t2 on t1.id = t2.sport_id where t1.sport_name = 'modern pentathlon' | Question: how many different events are there of modern pentathlon? | 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... | how many different events are there of modern pentathlon? |
olympics | select cast(count(case when t1.gender = 'f' then 1 else null end) as real) * 100 / count(t1.id) 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 event as t4 on t3.event_id = t4.id where t4.event_name = 'equestrianism mix... | Question: calculate the percentage of women who have participated in equestrianism mixed three-day event, individual. | 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, gende... | calculate the percentage of women who have participated in equestrianism mixed three-day event, individual. |
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 = '1992 summer' | Question: calculate the average age of the persons who participated in the 1992 summer 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... | calculate the average age of the persons who participated in the 1992 summer games. |
olympics | select games_year from games where season != 'winter' group by games_year having count(season) = 1 | Question: list out years that only have summer 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, ... | list out years that only have summer games. |
olympics | select count(games_year) from games where games_year between '1990' and '1999' | Question: how many olympics games were held during the 90s? | 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... | how many olympics games were held during the 90s? |
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 = '2014 winter' | Question: how many athletes participated in the 2014 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_competitor -> id, games... | how many athletes participated in the 2014 winter olympics? |
olympics | select count(t3.person_id) from competitor_event as t1 inner join games_competitor as t2 on t1.competitor_id = t2.id inner join person_region as t3 on t2.person_id = t3.person_id where t3.region_id = 151 and t1.medal_id != 4 | Question: how many athletes from region 151 have won a 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, per... | how many athletes from region 151 have won a medal? |
olympics | select count(t3.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 inner join person_region as t4 on t3.id = t4.person_id inner join noc_region as t5 on t4.region_id = t5.id where t1.games_name = '2016 summer' and t5.region_name = 'china' | Question: how many athlete from china participate in the 2016 summer 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_competitor -> ... | how many athlete from china participate in the 2016 summer olympics? |
olympics | select count(t2.competitor_id) from event as t1 inner join competitor_event as t2 on t1.id = t2.event_id where t1.event_name like 'ice hockey men%s ice hockey' and t2.medal_id = 1 | Question: how many gold medals were given to the winners in the ice hockey men's ice hockey 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. ... | how many gold medals were given to the winners in the ice hockey men's ice hockey event? |
olympics | select t5.region_name from medal as t1 inner join competitor_event as t2 on t1.id = t2.medal_id inner join games_competitor as t3 on t2.competitor_id = t3.id inner join person_region as t4 on t3.person_id = t4.person_id inner join noc_region as t5 on t4.region_id = t5.id where t1.id != 4 group by t5.region_name order b... | Question: which region has the highest medal number? | 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... | which region has the highest medal number? |
olympics | select distinct t5.full_name from event as t1 inner join competitor_event as t2 on t1.id = t2.event_id inner join games_competitor as t3 on t2.competitor_id = t3.id inner join sport as t4 on t1.sport_id = t4.id inner join person as t5 on t3.person_id = t5.id where t4.sport_name = 'cycling' and t2.medal_id = 1 | Question: list out all the gold medalist winners in cycling sport. | 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... | list out all the gold medalist winners in cycling sport. |
olympics | select distinct t1.medal_name from medal as t1 inner join competitor_event as t2 on t1.id = t2.medal_id inner join games_competitor as t3 on t2.competitor_id = t3.id inner join person as t4 on t3.person_id = t4.id where t4.full_name = 'lee chong wei' and t2.medal_id <> 4 | Question: list out all the medals won by lee chong wei. | 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 out all the medals won by lee chong wei. |
olympics | select cast(count(case when t3.gender = 'f' then 1 else null 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_name = '2002 winter' and t2.age < 20 | Question: what is the percentage of female athletes below 20s who participated in the 2002 winter olympic? | 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 percentage of female athletes below 20s who participated in the 2002 winter olympic? |
olympics | select cast(count(case when t3.gender = 'm' then 1 else null end) as real) / count(case when t3.gender = 'f' then 1 else null end) 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' | Question: what is the ratio male to female athletes in the 2012 summer olympic? | 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 ratio male to female athletes in the 2012 summer olympic? |
olympics | select ( select t1.games_name from games as t1 inner join games_competitor as t2 on t1.id = t2.games_id where t1.season = 'summer' group by t1.games_year order by count(t2.person_id) desc limit 1 ) as highest , ( select t1.games_name from games as t1 inner join games_competitor as t2 on t1.id = t2.games_id where t1.sea... | Question: which summer olympic have the highest and lowest number of participants? | 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... | which summer olympic have the highest and lowest number of participants? |
olympics | select count(t3.person_id) from medal as t1 inner join competitor_event as t2 on t1.id = t2.medal_id inner join games_competitor as t3 on t2.competitor_id = t3.id inner join person_region as t4 on t3.person_id = t4.person_id inner join noc_region as t5 on t4.region_id = t5.id where t5.region_name = 'malaysia' and t1.id... | Question: how many athletes from malaysia have won a 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, perso... | how many athletes from malaysia have won a medal? |
olympics | select count(t5.id) 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 inner join games as t6 on t4.games_id = t6.id where t1.sport_name = 'c... | Question: how many athletes playing in canoeing fall into overweight bmi category in the 2008 summer 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,... | how many athletes playing in canoeing fall into overweight bmi category in the 2008 summer games? |
olympics | select avg(t5.height) 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 t1.sport_name = 'basketball' and t5.gender = 'm' | Question: what is the average height of male athletes playing basketball sport? | 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 height of male athletes playing basketball sport? |
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 = 'philippines' and t3.gender = 'f' | Question: how many female athletes are from the philippines? | 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... | how many female athletes are from the philippines? |
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 = 'yao ming' | Question: which region is yao ming 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, person_id, age. person_r... | which region is yao ming from? |
olympics | select t2.age from person as t1 inner join games_competitor as t2 on t1.id = t2.person_id where t1.full_name = 'michael fred phelps, ii' order by t2.age limit 1 | Question: at what age did michael fred phelps, ii join the 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_competitor -> id, games_... | at what age did michael fred phelps, ii join the olympics? |
olympics | select count(person_id) from person_region where region_id = ( select t1.region_id from person_region as t1 inner join person as t2 on t1.person_id = t2.id where t2.full_name = 'clara hughes' ) | Question: how many athletes are there in the region where clara hughes is 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 ->... | how many athletes are there in the region where clara hughes is from? |
olympics | select count(t1.id) 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 event as t4 on t3.event_id = t4.id where t1.full_name = 'ian james thorpe' and t4.event_name like 'swimming men%s 200 metres freestyle' | Question: how many men's 200 metres freestyle events did ian james thorpe compete 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_competi... | how many men's 200 metres freestyle events did ian james thorpe compete in? |
olympics | select count(t1.id) from event as t1 inner join competitor_event as t2 on t1.id = t2.event_id inner join games_competitor as t3 on t2.competitor_id = t3.id inner join person as t4 on t3.person_id = t4.id where t4.full_name = 'larysa semenivna latynina (diriy-)' and t1.event_name like 'gymnastics women%s individual all-... | Question: how many times was larysa semenivna latynina (diriy-) declared as champion in gymnastics women's individual all-around? | 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... | how many times was larysa semenivna latynina (diriy-) declared as champion in gymnastics women's individual all-around? |
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 = 'carl lewis borack' | Question: what are the names of the cities where carl lewis borack 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... | what are the names of the cities where carl lewis borack 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 = 'london' | Question: how many olympic games were 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, ... | how many olympic games were held in london? |
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 = '1992 summer' | Question: which city was the 1992 summer olympic 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,... | which city was the 1992 summer olympic 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 = '2016 summer' and t2.age > 59 | Question: how many athletes over the age of 59 competed in the 2016 summer 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_competit... | how many athletes over the age of 59 competed in the 2016 summer 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 = 'los angeles' group by t1.id order by count(t2.person_id) desc limit 1 | Question: among the olympic games held in los angeles, what is the name of the olympic game that has the most number of competitors? | 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, f... | among the olympic games held in los angeles, what is the name of the olympic game that has the most number of competitors? |
olympics | select 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 where t3.event_name like 'gymnastics men%s parallel bars, teams' and t2.age = 10 | Question: how many 10-year old athletes participated in the gymnastics men's parallel bars, teams 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, we... | how many 10-year old athletes participated in the gymnastics men's parallel bars, teams event? |
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 = '2016 summer' and t4.region_name = 'usa' | Question: what is the average age of the athletes from the united states of america who competed in the 2016 summer 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_nam... | what is the average age of the athletes from the united states of america who competed in the 2016 summer olympics? |
olympics | select region_name from noc_region where noc = 'col' | Question: which region does the noc code 'col' stand for? | 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 region does the noc code 'col' stand for? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.