QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    Where was the 1920 Summer held? where it was held refers to city_name; the 1920 Summer refers to games_name = '1920 Summer';

    【Evidence】
    where it was held refers to city_name; the 1920 Summer refers to games_name = '1920 Summer';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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 = '1920 Summer'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    From 1900 to 1992, how many games did London host? From 1900 to 1992 refers to games_year BETWEEN 1900 AND 1992; London refers to city_name = 'London'; games refer to games_name;

    【Evidence】
    From 1900 to 1992 refers to games_year BETWEEN 1900 AND 1992; London refers to city_name = 'London'; games refer to games_name;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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' AND T3.games_year BETWEEN 1900 AND 1992
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    How many Summer games are there that were held in Paris? Summer games refer to games_id where season = 'Summer'; Paris refers to city_name = 'Paris';

    【Evidence】
    Summer games refer to games_id where season = 'Summer'; Paris refers to city_name = 'Paris';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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 = 'Paris' AND T3.season = 'Summer'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    Please list all game names that were held in Los Angeles. Los Angeles refers to city_name = 'Los Angeles';

    【Evidence】
    Los Angeles refers to city_name = 'Los Angeles';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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 = 'Los Angeles'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    Which city hosted the most games? Which city refers to city_name; the most games refer to MAX(COUNT(city_name));

    【Evidence】
    Which city refers to city_name; the most games refer to MAX(COUNT(city_name));

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id GROUP BY T2.city_name ORDER BY COUNT(T2.city_name) DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    What is the game name that was held in Beijing in 2008? Beijing refers to city_name = 'Beijing'; in 2008 refers to games_year = '2008';

    【Evidence】
    Beijing refers to city_name = 'Beijing'; in 2008 refers to games_year = '2008';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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 = 'Beijing' AND T3.games_year = 2008
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    What is the percentage of champions at the age of over 30? DIVIDE(COUNT(competitor_id where age > 30), COUNT(competitor_id))as percentage where medal_id = 1;

    【Evidence】
    DIVIDE(COUNT(competitor_id where age > 30), COUNT(competitor_id))as percentage where medal_id = 1;

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT CAST(COUNT(CASE WHEN T2.age > 30 THEN 1 END) AS REAL) * 100 / COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id WHERE T1.medal_id = 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 olympics
【Schema】
# Table: person_region
[
(person_id:INTEGER, Examples: [1, 2, 3]),
(region_id:INTEGER, Examples: [42, 56, 146])
]
# Table: competitor_event
[
(event_id:INTEGER, Examples: [1, 2, 3]),
(competitor_id:INTEGER, Examples: [1, 2, 3]),
(medal_id:INTEGER, Examples: [4, 1, 3])
]
# Table: games_city
[
(games_id:INTEGER, Examples: [1, 2, 3]),
(city_id:INTEGER, Examples: [1, 2, 3])
]
# Table: noc_region
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(noc:TEXT, Examples: [AFG, AHO, ALB]),
(region_name:TEXT, Examples: [Afghanistan, Netherlands Antilles, Albania])
]
# Table: person
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(full_name:TEXT, Examples: [A Dijiang, A Lamusi, Gunnar Nielsen Aaby]),
(gender:TEXT, Examples: [M, F]),
(height:INTEGER, Examples: [180, 170, 0]),
(weight:INTEGER, Examples: [80, 60, 0])
]
# Table: event
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_id:INTEGER, Examples: [9, 33, 25]),
(event_name:TEXT, Examples: [Basketball Men's Basketball])
]
# Table: games
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_year:INTEGER, Examples: [1992, 2012, 1920]),
(games_name:TEXT, Examples: [1992 Summer, 2012 Summer, 1920 Summer]),
(season:TEXT, Examples: [Summer, Winter])
]
# Table: medal
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(medal_name:TEXT, Examples: [Gold, Silver, Bronze])
]
# Table: sport
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(sport_name:TEXT, Examples: [Aeronautics, Alpine Skiing, Alpinism])
]
# Table: games_competitor
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(games_id:INTEGER, Examples: [1, 2, 3]),
(person_id:INTEGER, Examples: [1, 2, 3]),
(age:INTEGER, Examples: [24, 23, 34])
]
# Table: city
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(city_name:TEXT, Examples: [Barcelona, London, Antwerpen])
]
【Foreign keys】
person_region.person_id=person.id
person_region.region_id=noc_region.id
competitor_event.competitor_id=games_competitor.id
competitor_event.event_id=event.id
competitor_event.medal_id=medal.id
games_city.city_id=city.id
games_city.games_id=games.id
event.sport_id=sport.id
games_competitor.games_id=games.id
games_competitor.person_id=person.id

    【Question】
    At which age did A Lamusi participate in 2012 Summer? 2012 Summer refers to games_name = '2012 Summer';

    【Evidence】
    2012 Summer refers to games_name = '2012 Summer';

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

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 T1.games_name = '2012 Summer' AND T3.full_name = 'A Lamusi'