id
int64
0
9.43k
db_id
stringclasses
69 values
schema
stringclasses
69 values
question
stringlengths
24
325
output
stringlengths
23
804
evidence
stringlengths
0
673
filtered_schema
listlengths
0
16
4,900
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Which current legislator has served for more terms, Sherrod Brown or Maria Cantwell?
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
if sum(official_full_name = 'Maria Cantwell') > sum(official_full_name = 'Sherrod Brown') then Maria Cantwell has served for more term than Sherrod Brown; if sum(official_full_name = 'Sherrod Brown') > sum(official_full_name = 'Maria Cantwell'), then Sherrod Brown has served for more terms than Maria Cantwell;
[ "current-terms.bioguide", "current.bioguide_id", "current.official_full_name" ]
4,901
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among all the current legislators who have served for more than 4 terms, what is the percentage of them being female?
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
have served for more than 4 years refers to count(bioguide) > 4; percentage = MULTIPLY(DIVIDE(SUM(gender_bio = 'F'), count(bioguide)), 100.0); female refers to gender_bio = 'F'
[ "T3.bioguide", "current-terms.bioguide", "current.bioguide_id", "current.gender_bio" ]
4,902
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the average number of terms served for a current legislator that's famous or impact?
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
average = DIVIDE(COUNT(bioguide), COUNT(bioguide_id)); legislator that's famous or impact refers to wikipedia_id is not null;
[ "current-terms.bioguide", "current.bioguide_id", "current.wikipedia_id" ]
4,903
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many of the legislators are female?
SELECT COUNT(gender_bio) FROM current WHERE gender_bio = 'F'
female refers to gender_bio = 'F';
[ "current.gender_bio" ]
4,904
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the total number of senators New Jersey have?
SELECT COUNT(type) FROM `historical-terms` WHERE state = 'NJ' AND type = 'rep'
senators refers to type = 'rep'; New Jersey refers to state = 'NJ';
[ "historical-terms.state", "historical-terms.type" ]
4,905
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Provide the address of the legislator with the contact form of http://www.carper.senate.gov/contact/.
SELECT address FROM `current-terms` WHERE contact_form = 'http://www.carper.senate.gov/contact/'
[ "current-terms.address", "current-terms.contact_form" ]
4,906
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Provide the Instagram username of the legislator named Benjamin Hawkins.
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'
Instagram username refers to instagram;
[ "current.bioguide_id", "current.first_name", "current.last_name", "social-media.bioguide", "social-media.instagram" ]
4,907
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Give the alphanumeric ID of the Catholic legislators in Nebraska.
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'
alphanumeric ID refers to bioguide; Catholic legislators refers to religion_bio = 'Catholic'; Nebraska refers to state = 'NE';
[ "current-terms.bioguide", "current-terms.state", "current.bioguide_id", "current.religion_bio" ]
4,908
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
List down the MapLight ID of the representatives in Maine.
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
representatives refers to type = 'rep'; Maine refers to state = 'ME';
[ "historical-terms.bioguide", "historical-terms.state", "historical-terms.type", "historical.bioguide_id", "historical.maplight_id" ]
4,909
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Give the type and start date of the term of the legislator born on November 26, 1727.
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'
start date of the term refers to start; born on November 26, 1727 refers to birthday_bio = '1727-11-26';
[ "historical-terms.bioguide", "historical-terms.start", "historical-terms.type", "historical.bioguide_id", "historical.birthday_bio" ]
4,910
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
What is the contact form of the legislator named Rick Crawford?
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'
[ "current-terms.bioguide", "current-terms.contact_form", "current.bioguide_id", "current.official_full_name" ]
4,911
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
How many female representatives are there in Michigan?
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
female refers to gender_bio = 'F'; representatives refers to type = 'rep'; Michigan refers to state = 'MI';
[ "T.bioguide_id", "current-terms.bioguide", "current-terms.state", "current-terms.type", "current.bioguide_id", "current.gender_bio" ]
4,912
legislator
CREATE TABLE current ( ballotpedia_id TEXT, bioguide_id TEXT, birthday_bio DATE, cspan_id REAL, fec_id TEXT, first_name TEXT, gender_bio TEXT, google_entity_id_id TEXT, govtrack_id INTEGER, house_history_id ...
Among the female legislators, what is the percentage of the senators in Maine?
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'
female refers to gender_bio = 'F'; percentage = MULTIPLY(DIVIDE(SUM(type = 'sen'), COUNT(type)), 100.0); senators refers to type = 'sen'; Maine refers to state = 'ME';
[ "current-terms.bioguide", "current-terms.state", "current-terms.type", "current.bioguide_id", "current.gender_bio" ]
4,913
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Please list the names of all the Olympic games that John Aalberg has taken part in.
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'
name of the Olympic games refers to games_name;
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,914
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What was the name of the Olympic game that John Aalberg took part in when he was 31?
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
when he was 31 refers to age = 31; name of the Olympic games refers to games_name;
[ "games.games_name", "games.id", "games_competitor.age", "games_competitor.games_id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,915
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
When John Aalberg took part in the 1994 Winter Olympic Game, how old was he?
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'
how old was he refers to age; 1994 Winter refers to games_name = '1994 Winter';
[ "games.games_name", "games.id", "games_competitor.age", "games_competitor.games_id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,916
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many Olympic competitors are from Finland?
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'
competitors refer to person_id; from Finland refers to region_name = 'Finland';
[ "noc_region.id", "noc_region.region_name", "person_region.person_id", "person_region.region_id" ]
4,917
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Please list the names of all the Olympic competitors from Finland.
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'
names of competitors refer to full_name; from Finland refers to region_name = 'Finland';
[ "noc_region.id", "noc_region.region_name", "person.full_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,918
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
The Olympic competitor John Aalberg is from which region?
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'
from which region refers to region_name;
[ "noc_region.id", "noc_region.region_name", "person.full_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,919
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the NOC code of the region where the tallest male Olympic competitor is from?
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
NOC code of the region refers to noc; male refers to gender = 'M'; the tallest refers to MAX(height);
[ "noc_region.id", "noc_region.noc", "person.gender", "person.height", "person.id", "person_region.person_id", "person_region.region_id" ]
4,920
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Among all the Olympic competitors from Finland, how many of them are female?
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'
competitors from Finland refer to id where region_name = 'Finland'; female refers to gender = 'F';
[ "noc_region.id", "noc_region.region_name", "person.gender", "person.id", "person_region.person_id", "person_region.region_id" ]
4,921
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
In which city was the 1992 Summer Olympic Games held?
SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1992 Summer'
In which city refers to city_name; 1992 Summer Olympic Games refer to games_name = '1992 Summer';
[ "city.city_name", "city.id", "games.games_name", "games.id", "games_city.city_id", "games_city.games_id" ]
4,922
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Please list the names of the Olympic games that were held in London.
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'
held in London refers to city_name = 'London';
[ "city.city_name", "city.id", "games.games_name", "games.id", "games_city.city_id", "games_city.games_id" ]
4,923
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
In which year did London hold its earliest Olympic game?
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
In which year refers to games_year; London refers to city_name = 'London'; earliest Olympic game refers to MIN(games_year);
[ "city.city_name", "city.id", "games.games_year", "games.id", "games_city.city_id", "games_city.games_id" ]
4,924
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
For how many times has London held the Olympic games?
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'
London refers to city_name = 'London'; how many times refer to COUNT(games_id);
[ "city.city_name", "city.id", "games_city.city_id", "games_city.games_id" ]
4,925
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the average height of the male Olympic competitors from Finland?
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'
DIVIDE(SUM(height), COUNT(id)) where region_name = 'Finland' and gender = 'M';
[ "noc_region.id", "noc_region.region_name", "person.gender", "person.height", "person.id", "person_region.person_id", "person_region.region_id" ]
4,926
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Among the competitors of the 1994 Winter Olympic Game, what is the percentage of those from Finland?
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...
DIVIDE(COUNT(id where region_name = 'Finland'), COUNT(id)) as percentage where games_name = '1994 Winter';
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id", "noc_region.id", "noc_region.region_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,927
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which sport does the event "Shooting Women's Trap" belong to?
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'
sport refers to sport_name; event "Shooting Women's Trap" refers to event_name = 'Shooting Women''s Trap';
[ "event.event_name", "event.sport_id", "sport.id", "sport.sport_name" ]
4,928
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which city was the host of 1936 Winter Olympic Games?
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'
Which city refers to city_name; 1936 Winter Olympic refers to games_name = '1936 Winter';
[ "city.city_name", "city.id", "games.games_name", "games.id", "games_city.city_id", "games_city.games_id" ]
4,929
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many Olympic Games has London hosted?
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'
London refers to city_name = 'London';
[ "city.city_name", "city.id", "games.id", "games_city.city_id", "games_city.games_id" ]
4,930
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Tell the number of swimming related events.
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'
swimming refers to sport_name = 'Swimming';
[ "event.event_name", "event.sport_id", "sport.id", "sport.sport_name" ]
4,931
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
For Peter Kohnke, show the name of his/her region.
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'
name of his/her region refers to region_name;
[ "noc_region.id", "noc_region.region_name", "person.full_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,932
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which game has Jessica Carolina Aguilera Aguilera participated in? Give the id of the game.
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'
id of the game refers to games_id;
[ "games_competitor.games_id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,933
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Show the name of the sport with the most events.
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
name of the sport with the most events refers to sport_name where MAX(COUNT(id));
[ "event.event_name", "event.sport_id", "sport.id", "sport.sport_name" ]
4,934
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Give the name of the tallest athlete from Sweden.
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
the tallest athlete refers to id where MAX(height); from Sweden refers to region_name = 'Sweden'; name refers to full_name;
[ "noc_region.id", "noc_region.region_name", "person.full_name", "person.height", "person.id", "person_region.person_id", "person_region.region_id" ]
4,935
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes in the database are from Guatemala?
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'
from Guatemala refers to region_name = 'Guatemala';
[ "noc_region.id", "noc_region.region_name", "person_region.person_id", "person_region.region_id" ]
4,936
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Who has participated in the most Olympic Games in the database?
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
Who refers to full_name; participated in the most Olympic Games refers to MAX(COUNT(games_id));
[ "games_competitor.person_id", "person.full_name", "person.id" ]
4,937
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Show the name of the competitor id 90991.
SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.id = 90991
name of the competitor refers to full_name;
[ "games_competitor.id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,938
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many competitor ids does Martina Kohlov have?
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'
[ "games_competitor.id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,939
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Calculate the bmi of the competitor id 147420.
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
DIVIDE(weight), MULTIPLY(height, height) where id = 147420;
[ "games_competitor.id", "games_competitor.person_id", "person.height", "person.id", "person.weight" ]
4,940
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the percentage of male athletes from Estonia?
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'
DIVIDE(COUNT(id where gender = 'M'), COUNT(id)) as percentage where region_name = 'Estonia';
[ "noc_region.id", "noc_region.region_name", "person.gender", "person.id", "person_region.person_id", "person_region.region_id" ]
4,941
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Who is the youngest person who participated in the 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
Who is the youngest person refers to full_name where MIN(age);
[ "games_competitor.age", "games_competitor.person_id", "person.full_name", "person.id" ]
4,942
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many 24 years old competitors competed in Men's Basketball?
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
24 years old competitors refer to id where age = 24; Men's Basketball refers to event_name = 'Basketball Men''s Basketball';
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.event_name", "event.id", "games_competitor.age", "games_competitor.id", "games_competitor.person_id" ]
4,943
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What are the names of the events under Art Competitions?
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'
Art Competitions refer to sport_name = 'Art Competitions'; names of events refers to event_name;
[ "event.event_name", "event.sport_id", "sport.id", "sport.sport_name" ]
4,944
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many gold medals does Henk Jan Zwolle have?
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'
gold medals refer to medal_name = 'Gold';
[ "competitor_event.competitor_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "medal.id", "medal.medal_name", "person.full_name", "person.id" ]
4,945
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the name of the event where competitors received the most gold medals?
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
received the most gold medals refers to MAX(COUNT(medal_name = 'Gold'));
[ "competitor_event.event_id", "competitor_event.medal_id", "event.event_name", "event.id", "medal.id", "medal.medal_name" ]
4,946
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes are from Australia?
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'
from Australia refer region_name = 'Australia';
[ "noc_region.id", "noc_region.region_name", "person_region.person_id", "person_region.region_id" ]
4,947
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which cities hosted at least 3 Olympic games?
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
cities refer to city_name; hosted at least 3 Olympic games refers to COUNT(games_id) > = 3;
[ "city.city_name", "city.id", "games_city.city_id", "games_city.games_id" ]
4,948
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many Summer games were held in Stockholm?
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'
Summer games refer to id where season = 'Summer'; in Stockholm refers to city_name = 'Stockholm';
[ "city.city_name", "city.id", "games.id", "games.season", "games_city.city_id", "games_city.games_id" ]
4,949
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which region do most of the athletes are from?
SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1
region refers to region_name; most of the athletes refer to MAX(COUNT(person_id));
[ "noc_region.id", "noc_region.region_name", "person_region.person_id", "person_region.region_id" ]
4,950
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Where was the first Olympic game held?
SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id ORDER BY T3.games_year LIMIT 1
Where it was held refers to city_name; the first Olympic game refers to id where MIN(games_year);
[ "city.city_name", "city.id", "games.games_year", "games.id", "games_city.city_id", "games_city.games_id" ]
4,951
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the name of the game in which the oldest Olympian has ever participated?
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
the oldest Olympian refers to id where MAX(age); name of the game refers to games_name;
[ "games.games_name", "games.id", "games_competitor.age", "games_competitor.games_id" ]
4,952
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes competed in the 1992 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 = '1928 Summer'
1992 Summer Olympics refer to games_name = '1928 Summer';
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id" ]
4,953
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many Olympic events did Michael Phelps II join in total? Find the percentage of the events where he won a gold medal.
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...
DIVIDE(COUNT(event_id where medal_name = 'Gold'), COUNT(event_id)) as percentage where full_name = 'Michael Fred Phelps, II';
[ "competitor_event.competitor_id", "competitor_event.event_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "medal.id", "person.full_name", "person.id" ]
4,954
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
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.
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...
the most number of competitors refer to MAX(COUNT(person_id)); SUBTRACT(COUNT(person_id where games_name = '1988 Summer'), COUNT(person_id where games_name = '1988 Winter'));
[ "games.games_name", "games.id", "games.season", "games_competitor.games_id", "games_competitor.person_id" ]
4,955
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What age of the competitors is the most numerous?
SELECT age FROM games_competitor GROUP BY age ORDER BY COUNT(person_id) DESC LIMIT 1
age is the most numerous refers to age where MAX(COUNT(person_id));
[ "games_competitor.age", "games_competitor.person_id" ]
4,956
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
In which cities beginning with the letter M have the Olympic Games been held?
SELECT city_name FROM city WHERE city_name LIKE 'M%'
cities beginning with the letter M refer to city_name LIKE 'M%';
[ "city.city_name" ]
4,957
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
In which cities were the 1976 winter and summer games held?
SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name IN ('1976 Summer', '1976 Winter')
cities refer to city_name; 1976 winter and summer games refer to games_name IN ('1976 Winter', '1976 Summer');
[ "city.city_name", "city.id", "games.games_name", "games.id", "games_city.city_id", "games_city.games_id" ]
4,958
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What was the medal that Coleen Dufresne got?
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)'
What medal refers to medal_name;
[ "competitor_event.competitor_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "medal.id", "medal.medal_name", "person.full_name", "person.id" ]
4,959
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the name of the competitor who has won the most medals?
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
name of the competitor refers to full_name; won the most medals refer to MAX(COUNT(medal_id));
[ "competitor_event.competitor_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "medal.id", "person.full_name", "person.id" ]
4,960
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Where is competitor Estelle Nze Minko from?
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'
Where competitor is from refers to region_name;
[ "noc_region.id", "noc_region.region_name", "person.full_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,961
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the name of all the sports Chin Eei Hui has competed in?
SELECT DISTINCT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id INNER JOIN competitor_event AS T3 ON T2.id = T3.event_id INNER JOIN games_competitor AS T4 ON T3.competitor_id = T4.id INNER JOIN person AS T5 ON T4.person_id = T5.id WHERE T5.full_name = 'Chin Eei Hui'
name of the sport refers to sport_name;
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.id", "event.sport_id", "games_competitor.id", "games_competitor.person_id", "person.full_name", "person.id", "sport.id", "sport.sport_name" ]
4,962
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the name of the oldest person who participated in the Olympic Games?
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
the oldest person refers to person_id where MAX(age); name refers to full_name;
[ "games_competitor.age", "games_competitor.person_id", "person.full_name", "person.id" ]
4,963
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
In which Olympic Games have the largest number of women participation?
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
the largest number of women participation refers to MAX(COUNT(gender = 'F')); In which Olympic Games refer to games_year;
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id", "person.gender", "person.id" ]
4,964
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many males from Belgium have participated in an Olympic Games?
SELECT COUNT(T2.person_id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Belgium' AND T3.gender = 'M'
males refer to gender = 'M'; Belgium refers to region_name = 'Belgium';
[ "noc_region.id", "noc_region.region_name", "person.gender", "person.id", "person_region.person_id", "person_region.region_id" ]
4,965
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many persons participated in the Sapporo 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'
the Sapporo Olympics refer to games_id where city_name = 'Sapporo';
[ "city.city_name", "city.id", "games_city.city_id", "games_city.games_id", "games_competitor.games_id", "games_competitor.person_id" ]
4,966
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
In which Olympic Games has Morten Aleksander Djupvik participated?
SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Morten Aleksander Djupvik'
In which Olympic Games refer to games_year;
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,967
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many persons in total have participated in 12 meter Mixed Sailing competitions?
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'
12 meter Mixed Sailing competitions refer to event_name = 'Sailing Mixed 12 metres';
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.event_name", "event.id", "event.sport_id", "sport.id" ]
4,968
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many different events are there of Modern Pentathlon?
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'
Modern Pentathlon refers to sport_name = 'Modern Pentathlon';
[ "event.event_name", "event.sport_id", "sport.id", "sport.sport_name" ]
4,969
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Calculate the percentage of women who have participated in Equestrianism Mixed Three-Day Event, Individual.
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...
DIVIDE(COUNT(person_id where gender = 'F), COUNT(person_id)) as percentage where event_name = 'Equestrianism Mixed Three-Day Event, Individual';
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.event_name", "event.id", "games_competitor.id", "games_competitor.person_id", "person.gender", "person.id" ]
4,970
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Calculate the average age of the persons who participated in the 1992 Summer Games.
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'
DIVIDE(SUM(age), COUNT(person_id)) where games_name = '1992 Summer';
[ "games.games_name", "games.id", "games_competitor.age", "games_competitor.games_id", "games_competitor.person_id", "person.id" ]
4,971
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
List out years that only have summer games.
SELECT games_year FROM games WHERE season != 'Winter' GROUP BY games_year HAVING COUNT(season) = 1
years refer to games_year; only have summer games refer to games_year where COUNT(games_name) = 1 and season = 'Summer';
[ "games.games_year", "games.season" ]
4,972
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many Olympics games were held during the 90s?
SELECT COUNT(games_year) FROM games WHERE games_year BETWEEN '1990' AND '1999'
games refer to id; during the 90s refers to games_year BETWEEN 1990 AND 1999;
[ "games.games_year" ]
4,973
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes participated in the 2014 Winter Olympics?
SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2014 Winter'
athletes refer to person_id; 2014 Winter Olympics refer to games_name = '2014 Winter';
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id" ]
4,974
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes from region 151 have won a medal?
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
athletes refer to person_id; region 151 refers to region_id = 151; won a medal refers to medal_id <> 4;
[ "competitor_event.competitor_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "person_region.person_id", "person_region.region_id" ]
4,975
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athlete from China participate in the 2016 Summer 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'
athletes from China refer to person_id where region_name = 'China'; the 2016 Summer Olympics refer to games_name = '2016 Summer';
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id", "noc_region.id", "noc_region.region_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,976
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many gold medals were given to the winners in the Ice Hockey Men's Ice Hockey event?
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
gold medals given to the winners refer to competitor_id where medal_name = 'Gold'; Ice Hockey Men's Ice Hockey refers to event_name = 'Ice Hockey Men''s Ice Hockey';
[ "competitor_event.competitor_id", "competitor_event.event_id", "competitor_event.medal_id", "event.event_name", "event.id" ]
4,977
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which region has the highest medal number?
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...
region refers to region_name; the highest medal number refers to MAX(COUNT(medal_id <> 4));
[ "competitor_event.competitor_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "medal.id", "noc_region.id", "noc_region.region_name", "person_region.person_id", "person_region.region_id" ]
4,978
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
List out all the gold medalist winners in cycling sport.
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
gold medalist winners refer to full_name where medal_name = 'Gold'; cycling sport refers to sport_name = 'Cycling';
[ "competitor_event.competitor_id", "competitor_event.event_id", "competitor_event.medal_id", "event.id", "event.sport_id", "games_competitor.id", "games_competitor.person_id", "person.full_name", "person.id", "sport.id", "sport.sport_name" ]
4,979
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
List out all the medals won by Lee Chong Wei.
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
medals refer to medal_id where medal_id <> 4;
[ "competitor_event.competitor_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "medal.id", "medal.medal_name", "person.full_name", "person.id" ]
4,980
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the percentage of female athletes below 20s who participated in the 2002 Winter Olympic?
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
DIVIDE(COUNT(person_id where gender = 'F' and age < 20), COUNT(person_id)) as percentage where games_name = '2002 Winter';
[ "games.games_name", "games.id", "games_competitor.age", "games_competitor.games_id", "games_competitor.person_id", "person.gender", "person.id" ]
4,981
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the ratio male to female athletes in the 2012 Summer Olympic?
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'
DIVIDE(COUNT(gender = 'M'), COUNT(gender = 'F')) where games_name = '2012 Summer';
[ "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.person_id", "person.gender", "person.id" ]
4,982
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which summer Olympic have the highest and lowest number of participants?
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...
the highest number of participants refers to MAX(COUNT(person_id)); the lowest number of participants refers to MIN(COUNT(person_id)); Which summer Olympic refers to games_name where season = 'Summer';
[ "games.games_name", "games.games_year", "games.id", "games.season", "games_competitor.games_id", "games_competitor.person_id" ]
4,983
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes from Malaysia have won a medal?
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...
Malaysia refers to region_name = 'Malaysia'; athletes won a medal refer to competitor_id where medal_id <> 4;
[ "competitor_event.competitor_id", "competitor_event.medal_id", "games_competitor.id", "games_competitor.person_id", "medal.id", "noc_region.id", "noc_region.region_name", "person_region.person_id", "person_region.region_id" ]
4,984
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes playing in Canoeing fall into overweight BMI category in the 2008 Summer games?
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...
fall into overweight BMI category refers to DIVIDE(weight), MULTIPLY(height, height) < 30; Canoeing refers to a sport name; the 2008 Summer games refer to games_name = '2008 Summer';
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.id", "event.sport_id", "games.games_name", "games.id", "games_competitor.games_id", "games_competitor.id", "games_competitor.person_id", "person.height", "person.id", "person.weight", "sport.id", "sport.sport_name" ]
4,985
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the average height of male athletes playing basketball sport?
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'
AVG(height) where sport_name = 'Basketball' and event_name = 'Basketball Men''s';
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.id", "event.sport_id", "games_competitor.id", "games_competitor.person_id", "person.gender", "person.height", "person.id", "sport.id", "sport.sport_name" ]
4,986
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many female athletes are from the Philippines?
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'
female athletes refer to id where gender = 'F'; from the Philippines region_name = 'Philippines';
[ "noc_region.id", "noc_region.region_name", "person.gender", "person.id", "person_region.person_id", "person_region.region_id" ]
4,987
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which region is Yao Ming from?
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'
region refers to region_name;
[ "noc_region.id", "noc_region.region_name", "person.full_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,988
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
At what age did Michael Fred Phelps, II join the 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
At what age join the Olympics refers to MIN(age);
[ "games_competitor.age", "games_competitor.person_id", "person.full_name", "person.id" ]
4,989
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes are there in the region where Clara Hughes is from?
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' )
[ "person.full_name", "person.id", "person_region.person_id", "person_region.region_id" ]
4,990
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many Men's 200 Metres Freestyle events did Ian James Thorpe compete in?
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'
Men's 200 Metres Freestyle events refer to event_name = 'Swimming Men''s 200 metres Freestyle'; events compete in refers to event_id;
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.event_name", "event.id", "games_competitor.id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,991
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many times was Larysa Semenivna Latynina (Diriy-) declared as champion in Gymnastics Women's Individual All-Around?
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-...
Gymnastics Women's Individual All-Around refers to event_name = 'Gymnastics Women''s Individual All-Around'; declared as champion refers to medal_name = 'Gold' or medal_id = 1;
[ "competitor_event.competitor_id", "competitor_event.event_id", "competitor_event.medal_id", "event.event_name", "event.id", "games_competitor.id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,992
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What are the names of the cities where Carl Lewis Borack competed?
SELECT T4.city_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T1.full_name = 'Carl Lewis Borack'
name of the cities refers to city_name
[ "city.city_name", "city.id", "games_city.city_id", "games_city.games_id", "games_competitor.games_id", "games_competitor.person_id", "person.full_name", "person.id" ]
4,993
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many Olympic games were held in London?
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'
London refers to city_name = 'London';
[ "city.city_name", "city.id", "games_city.city_id", "games_city.games_id" ]
4,994
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which city was the 1992 Summer Olympic held?
SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1992 Summer'
city refers to city_name; 1992 Summer Olympic refers to games_name = '1992 Summer';
[ "city.city_name", "city.id", "games.games_name", "games.id", "games_city.city_id", "games_city.games_id" ]
4,995
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many athletes over the age of 59 competed in the 2016 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 = '2016 Summer' AND T2.age > 59
over the age of 59 refers to age > 59; the 2016 Summer Olympics refer to games_name = '2016 Summer';
[ "games.games_name", "games.id", "games_competitor.age", "games_competitor.games_id", "games_competitor.person_id" ]
4,996
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Among the Olympic games held in Los Angeles, what is the name of the Olympic game that has the most number of competitors?
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
Los Angeles refers to city_name = 'Lost Angeles'; the Olympic game refers to games_name; the most number of competitors refers to MAX(COUNT(games_name));
[ "city.city_name", "city.id", "games.games_name", "games.id", "games_city.city_id", "games_city.games_id", "games_competitor.games_id", "games_competitor.person_id" ]
4,997
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
How many 10-year old athletes participated in the Gymnastics Men's Parallel Bars, Teams event?
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
10-year old athletes refer to competitor_id where age = 10; Gymnastics Men's Parallel Bars, Teams refer to event_name = 'Gymnastics Men''s Parallel Bars, Teams';
[ "competitor_event.competitor_id", "competitor_event.event_id", "event.event_name", "event.id", "games_competitor.age", "games_competitor.id", "games_competitor.person_id" ]
4,998
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
What is the average age of the athletes from the United States of America who competed in the 2016 Summer 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'
AVG(age) where games_name = '2016 Summer' and region_name = 'USA';
[ "games.games_name", "games.id", "games_competitor.age", "games_competitor.games_id", "games_competitor.person_id", "noc_region.id", "noc_region.region_name", "person_region.person_id", "person_region.region_id" ]
4,999
olympics
CREATE TABLE city ( id INTEGER not null primary key, city_name TEXT default NULL ); CREATE TABLE games ( id INTEGER not null primary key, games_year INTEGER default NULL, games_name TEXT default NULL, season TEXT default NULL ); CREATE TABLE ...
Which region does the NOC code "COL" stand for?
SELECT region_name FROM noc_region WHERE noc = 'COL'
region refers to region_name; NOC code "COL" refers to noc = 'COL';
[ "noc_region.noc", "noc_region.region_name" ]