Chinastark/bird_dataset huggingface dataset:
Database: legislator
Question: Among the female legislators, what is the percentage of the senators in Maine?
Evidence: 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';
SQL: 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'
Database: olympics
Question: Please list the names of all the Olympic games that John Aalberg has taken part in.
Evidence: name of the Olympic games refers to games_name;
SQL: 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'
Database: olympics
Question: What was the name of the Olympic game that John Aalberg took part in when he was 31?
Evidence: when he was 31 refers to age = 31; name of the Olympic games refers to games_name;
SQL: 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
Database: olympics
Question: When John Aalberg took part in the 1994 Winter Olympic Game, how old was he?
Evidence: how old was he refers to age; 1994 Winter refers to games_name = '1994 Winter';
SQL: 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'
Database: olympics
Question: How many Olympic competitors are from Finland?
Evidence: competitors refer to person_id; from Finland refers to region_name = 'Finland';
SQL: 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'
Database: olympics
Question: Please list the names of all the Olympic competitors from Finland.
Evidence: names of competitors refer to full_name; from Finland refers to region_name = 'Finland';
SQL: 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'
Database: olympics
Question: The Olympic competitor John Aalberg is from which region?
Evidence: from which region refers to region_name;
SQL: 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'
Database: olympics
Question: What is the NOC code of the region where the tallest male Olympic competitor is from?
Evidence: NOC code of the region refers to noc; male refers to gender = 'M'; the tallest refers to MAX(height);
SQL: 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
Database: olympics
Question: Among all the Olympic competitors from Finland, how many of them are female?
Evidence: competitors from Finland refer to id where region_name = 'Finland'; female refers to gender = 'F';
SQL: 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'
Database: olympics
Question: In which city was the 1992 Summer Olympic Games held?
Evidence: In which city refers to city_name; 1992 Summer Olympic Games refer to games_name = '1992 Summer';
SQL: 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'
Database: olympics
Question: Please list the names of the Olympic games that were held in London.
Evidence: held in London refers to city_name = 'London';
SQL: 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'
Database: olympics
Question: In which year did London hold its earliest Olympic game?
Evidence: In which year refers to games_year; London refers to city_name = 'London'; earliest Olympic game refers to MIN(games_year);
SQL: 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
Database: olympics
Question: For how many times has London held the Olympic games?
Evidence: London refers to city_name = 'London'; how many times refer to COUNT(games_id);
SQL: 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'
Database: olympics
Question: What is the average height of the male Olympic competitors from Finland?
Evidence: DIVIDE(SUM(height), COUNT(id)) where region_name = 'Finland' and gender = 'M';
SQL: 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'
Database: olympics
Question: Among the competitors of the 1994 Winter Olympic Game, what is the percentage of those from Finland?
Evidence: DIVIDE(COUNT(id where region_name = 'Finland'), COUNT(id)) as percentage where games_name = '1994 Winter';
SQL: 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.region_id = T5.id WHERE T1.games_name = '1994 Winter'
Database: olympics
Question: Which sport does the event "Shooting Women's Trap" belong to?
Evidence: sport refers to sport_name; event "Shooting Women's Trap" refers to event_name = 'Shooting Women''s Trap';
SQL: 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'
Database: olympics
Question: Which city was the host of 1936 Winter Olympic Games?
Evidence: Which city refers to city_name; 1936 Winter Olympic refers to games_name = '1936 Winter';
SQL: 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'
Database: olympics
Question: How many Olympic Games has London hosted?
Evidence: London refers to city_name = 'London';
SQL: 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'
Database: olympics
Question: Tell the number of swimming related events.
Evidence: swimming refers to sport_name = 'Swimming';
SQL: 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'
Database: olympics
Question: For Peter Kohnke, show the name of his/her region.
Evidence: name of his/her region refers to region_name;
SQL: 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'
Database: olympics
Question: Which game has Jessica Carolina Aguilera Aguilera participated in? Give the id of the game.
Evidence: id of the game refers to games_id;
SQL: 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'
Database: olympics
Question: Show the name of the sport with the most events.
Evidence: name of the sport with the most events refers to sport_name where MAX(COUNT(id));
SQL: 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
Database: olympics
Question: Give the name of the tallest athlete from Sweden.
Evidence: the tallest athlete refers to id where MAX(height); from Sweden refers to region_name = 'Sweden'; name refers to full_name;
SQL: 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
Database: olympics
Question: How many athletes in the database are from Guatemala?
Evidence: from Guatemala refers to region_name = 'Guatemala';
SQL: 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'
Database: olympics
Question: Who has participated in the most Olympic Games in the database?
Evidence: Who refers to full_name; participated in the most Olympic Games refers to MAX(COUNT(games_id));
SQL: 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
Database: olympics
Question: Show the name of the competitor id 90991.
Evidence: name of the competitor refers to full_name;
SQL: SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.id = 90991
Database: olympics
Question: How many competitor ids does Martina Kohlov have?
SQL: 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'
Database: olympics
Question: Calculate the bmi of the competitor id 147420.
Evidence: DIVIDE(weight), MULTIPLY(height, height) where id = 147420;
SQL: 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
Database: olympics
Question: What is the percentage of male athletes from Estonia?
Evidence: DIVIDE(COUNT(id where gender = 'M'), COUNT(id)) as percentage where region_name = 'Estonia';
SQL: 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'
Database: olympics
Question: Who is the youngest person who participated in the Olympics?
Evidence: Who is the youngest person refers to full_name where MIN(age);
SQL: 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
Database: olympics
Question: How many 24 years old competitors competed in Men's Basketball?
Evidence: 24 years old competitors refer to id where age = 24; Men's Basketball refers to event_name = 'Basketball Men''s Basketball';
SQL: 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
Database: olympics
Question: What are the names of the events under Art Competitions?
Evidence: Art Competitions refer to sport_name = 'Art Competitions'; names of events refers to event_name;
SQL: 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'
Database: olympics
Question: How many gold medals does Henk Jan Zwolle have?
Evidence: gold medals refer to medal_name = 'Gold';
SQL: 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'
Database: olympics
Question: What is the name of the event where competitors received the most gold medals?
Evidence: received the most gold medals refers to MAX(COUNT(medal_name = 'Gold'));
SQL: 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
Database: olympics
Question: How many athletes are from Australia?
Evidence: from Australia refer region_name = 'Australia';
SQL: 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'
Database: olympics
Question: Which cities hosted at least 3 Olympic games?
Evidence: cities refer to city_name; hosted at least 3 Olympic games refers to COUNT(games_id) > = 3;
SQL: 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
Database: olympics
Question: How many Summer games were held in Stockholm?
Evidence: Summer games refer to id where season = 'Summer'; in Stockholm refers to city_name = 'Stockholm';
SQL: 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'
Database: olympics
Question: Which region do most of the athletes are from?
Evidence: region refers to region_name; most of the athletes refer to MAX(COUNT(person_id));
SQL: 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
Database: olympics
Question: Where was the first Olympic game held?
Evidence: Where it was held refers to city_name; the first Olympic game refers to id where MIN(games_year);
SQL: 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
Database: olympics
Question: What is the name of the game in which the oldest Olympian has ever participated?
Evidence: the oldest Olympian refers to id where MAX(age); name of the game refers to games_name;
SQL: 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
Database: olympics
Question: How many athletes competed in the 1992 Summer Olympics?
Evidence: 1992 Summer Olympics refer to games_name = '1928 Summer';
SQL: 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'
Database: olympics
Question: How many Olympic events did Michael Phelps II join in total? Find the percentage of the events where he won a gold medal.
Evidence: DIVIDE(COUNT(event_id where medal_name = 'Gold'), COUNT(event_id)) as percentage where full_name = 'Michael Fred Phelps, II';
SQL: 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 = 'Michael Fred Phelps, II'
Database: olympics
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.
Evidence: 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'));
SQL: 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 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
Database: olympics
Question: What age of the competitors is the most numerous?
Evidence: age is the most numerous refers to age where MAX(COUNT(person_id));
SQL: SELECT age FROM games_competitor GROUP BY age ORDER BY COUNT(person_id) DESC LIMIT 1
Database: olympics
Question: In which cities beginning with the letter M have the Olympic Games been held?
Evidence: cities beginning with the letter M refer to city_name LIKE 'M%';
SQL: SELECT city_name FROM city WHERE city_name LIKE 'M%'
Database: olympics
Question: In which cities were the 1976 winter and summer games held?
Evidence: cities refer to city_name; 1976 winter and summer games refer to games_name IN ('1976 Winter', '1976 Summer');
SQL: 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')
Database: olympics
Question: What was the medal that Coleen Dufresne got?
Evidence: What medal refers to medal_name;
SQL: 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)'
Database: olympics
Question: What is the name of the competitor who has won the most medals?
Evidence: name of the competitor refers to full_name; won the most medals refer to MAX(COUNT(medal_id));
SQL: 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
Database: olympics
Question: Where is competitor Estelle Nze Minko from?
Evidence: Where competitor is from refers to region_name;
SQL: 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'
Database: olympics
Question: What is the name of all the sports Chin Eei Hui has competed in?
Evidence: name of the sport refers to sport_name;
SQL: 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'
Database: olympics
Question: What is the name of the oldest person who participated in the Olympic Games?
Evidence: the oldest person refers to person_id where MAX(age); name refers to full_name;
SQL: 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
Database: olympics
Question: In which Olympic Games have the largest number of women participation?
Evidence: the largest number of women participation refers to MAX(COUNT(gender = 'F')); In which Olympic Games refer to games_year;
SQL: 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
Database: olympics
Question: How many males from Belgium have participated in an Olympic Games?
Evidence: males refer to gender = 'M'; Belgium refers to region_name = 'Belgium';
SQL: 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'
Database: olympics
Question: How many persons participated in the Sapporo Olympics?
Evidence: the Sapporo Olympics refer to games_id where city_name = 'Sapporo';
SQL: 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'
Database: olympics
Question: In which Olympic Games has Morten Aleksander Djupvik participated?
Evidence: In which Olympic Games refer to games_year;
SQL: 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'
Database: olympics
Question: How many persons in total have participated in 12 meter Mixed Sailing competitions?
Evidence: 12 meter Mixed Sailing competitions refer to event_name = 'Sailing Mixed 12 metres';
SQL: 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'
Database: olympics
Question: How many different events are there of Modern Pentathlon?
Evidence: Modern Pentathlon refers to sport_name = 'Modern Pentathlon';
SQL: 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'
Database: olympics
Question: Calculate the percentage of women who have participated in Equestrianism Mixed Three-Day Event, Individual.
Evidence: DIVIDE(COUNT(person_id where gender = 'F), COUNT(person_id)) as percentage where event_name = 'Equestrianism Mixed Three-Day Event, Individual';
SQL: 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 Mixed Three-Day Event, Individual'
Database: olympics
Question: Calculate the average age of the persons who participated in the 1992 Summer Games.
Evidence: DIVIDE(SUM(age), COUNT(person_id)) where games_name = '1992 Summer';
SQL: 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'
Database: olympics
Question: List out years that only have summer games.
Evidence: years refer to games_year; only have summer games refer to games_year where COUNT(games_name) = 1 and season = 'Summer';
SQL: SELECT games_year FROM games WHERE season != 'Winter' GROUP BY games_year HAVING COUNT(season) = 1
Database: olympics
Question: How many Olympics games were held during the 90s?
Evidence: games refer to id; during the 90s refers to games_year BETWEEN 1990 AND 1999;
SQL: SELECT COUNT(games_year) FROM games WHERE games_year BETWEEN '1990' AND '1999'
Database: olympics
Question: How many athletes participated in the 2014 Winter Olympics?
Evidence: athletes refer to person_id; 2014 Winter Olympics refer to games_name = '2014 Winter';
SQL: 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'
Database: olympics
Question: How many athletes from region 151 have won a medal?
Evidence: athletes refer to person_id; region 151 refers to region_id = 151; won a medal refers to medal_id <> 4;
SQL: 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
Database: olympics
Question: How many athlete from China participate in the 2016 Summer Olympics?
Evidence: athletes from China refer to person_id where region_name = 'China'; the 2016 Summer Olympics refer to games_name = '2016 Summer';
SQL: 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'