1sf/bird-sql-train-with-schema huggingface dataset:
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
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
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
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
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
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
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
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
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
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'
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many gold medals were given to the winners in the Ice Hockey Men's Ice Hockey event?
Evidence: 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';
SQL: 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
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: Which region has the highest medal number?
Evidence: region refers to region_name; the highest medal number refers to MAX(COUNT(medal_id <> 4));
SQL: 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 BY COUNT(T2.competitor_id) DESC LIMIT 1
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: List out all the gold medalist winners in cycling sport.
Evidence: gold medalist winners refer to full_name where medal_name = 'Gold'; cycling sport refers to sport_name = 'Cycling';
SQL: 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
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: List out all the medals won by Lee Chong Wei.
Evidence: medals refer to medal_id where medal_id <> 4;
SQL: 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
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: What is the percentage of female athletes below 20s who participated in the 2002 Winter Olympic?
Evidence: DIVIDE(COUNT(person_id where gender = 'F' and age < 20), COUNT(person_id)) as percentage where games_name = '2002 Winter';
SQL: 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
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: What is the ratio male to female athletes in the 2012 Summer Olympic?
Evidence: DIVIDE(COUNT(gender = 'M'), COUNT(gender = 'F')) where games_name = '2012 Summer';
SQL: 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'
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: Which summer Olympic have the highest and lowest number of participants?
Evidence: 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';
SQL: 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.season = 'Summer' GROUP BY T1.games_year ORDER BY COUNT(T2.person_id) LIMIT 1 ) AS LOWEST
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many athletes from Malaysia have won a medal?
Evidence: Malaysia refers to region_name = 'Malaysia'; athletes won a medal refer to competitor_id where medal_id <> 4;
SQL: 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 != 4
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many athletes playing in Canoeing fall into overweight BMI category in the 2008 Summer games?
Evidence: 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';
SQL: 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 = 'Canoeing' AND T6.games_name = '2008 Summer' AND T5.weight * 10000.0 / (T5.height * T5.height) BETWEEN 25.0 AND 30
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: What is the average height of male athletes playing basketball sport?
Evidence: AVG(height) where sport_name = 'Basketball' and event_name = 'Basketball Men''s';
SQL: 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'
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many female athletes are from the Philippines?
Evidence: female athletes refer to id where gender = 'F'; from the Philippines region_name = 'Philippines';
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 = 'Philippines' AND T3.gender = 'F'
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: Which region is Yao Ming from?
Evidence: 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 = 'Yao Ming'
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: At what age did Michael Fred Phelps, II join the Olympics?
Evidence: At what age join the Olympics refers to MIN(age);
SQL: 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
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many athletes are there in the region where Clara Hughes is from?
SQL: 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' )
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many Men's 200 Metres Freestyle events did Ian James Thorpe compete in?
Evidence: Men's 200 Metres Freestyle events refer to event_name = 'Swimming Men''s 200 metres Freestyle'; events compete in refers to event_id;
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 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'
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many times was Larysa Semenivna Latynina (Diriy-) declared as champion in Gymnastics Women's Individual All-Around?
Evidence: 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;
SQL: 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-Around' AND T2.medal_id = 1
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: What are the names of the cities where Carl Lewis Borack competed?
Evidence: name of the cities refers to city_name
SQL: 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'
Database: olympics
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: How many Olympic games were held in London?
Evidence: London refers to city_name = 'London';
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
Tables: city, games, games_city, medal, noc_region, person, games_competitor, person_region, sport, event, competitor_event
Columns (table index, column name): -1, *, 0, id, 0, city_name, 1, id, 1, games_year, 1, games_name, 1, season, 2, games_id, 2, city_id, 3, id, 3, medal_name, 4, id, 4, noc, 4, region_name, 5, id, 5, full_name, 5, gender, 5, height, 5, weight, 6, id, 6, games_id, 6, person_id, 6, age, 7, person_id, 7, region_id, 8, id, 8, sport_name, 9, id, 9, sport_id, 9, event_name, 10, event_id, 10, competitor_id, 10, medal_id
Question: Which city was the 1992 Summer Olympic held?
Evidence: city refers to city_name; 1992 Summer Olympic refers 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'