1sf/bird-sql-train-with-schema huggingface dataset:
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Which publisher has published the most games in the 'Puzzle' genre?
Evidence: which publisher refers to publisher_name; publisher that has published the most games refers to MAX(COUNT(publisher_name)); puzzle genre refers to genre_name = 'Puzzle';
SQL: SELECT T.publisher_name FROM ( SELECT T1.publisher_name, COUNT(T3.id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' GROUP BY T1.publisher_name ORDER BY COUNT(T3.id) DESC LIMIT 1 ) t
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Which game has sold the fewest units?
Evidence: which game refers to game_name; sold the fewest units refers to MIN(num_sales);
SQL: SELECT T.game_name FROM ( SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id ORDER BY T4.num_sales LIMIT 1 ) t
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Which publisher has published the game 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3'?
Evidence: which publisher refers to publisher_name; 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3' refers to game_name = 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3';
SQL: SELECT T1.publisher_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: In which regions has the game 'Pengo' been sold?
Evidence: which regions refers to region_name; 'Pengo' refers to game_name = 'Pengo';
SQL: SELECT T5.region_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id INNER JOIN region AS T5 ON T4.region_id = T5.id WHERE T1.game_name = 'Pengo'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: List by name all the games released in the year 2010.
Evidence: name of the games refers to game_name; released in the year 2010 refers to release_year = 2010;
SQL: SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T3.release_year = '2010'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Calculate the average game sales for the PS2 platform.
Evidence: average = AVG(MULTIPLY(num_sales), 100000); PS2 refers to platform_name = 'PS2';
SQL: SELECT SUM(T3.num_sales * 100000) / COUNT(T1.id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T2.id = T3.game_platform_id WHERE T1.platform_name = 'PS2'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Calculate the percentage of games published by 'Brash Entertainment'?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(publisher_name = 'Brash Entertainment'), COUNT(game_id)), 100.0); 'Brash Entertainment' refers to publisher_name = 'Brash Entertainment';
SQL: SELECT CAST(COUNT(CASE WHEN T1.publisher_name = 'Brash Entertainment' THEN T2.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: What is the total number of games sold in region ID 1?
Evidence: total number of games sold = MULTIPLY(SUM(num_sales), 100000);
SQL: SELECT SUM(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 1
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: How many FIFA games are there across all platforms?
Evidence: FIFA games refers to game_name LIKE '%FIFA%';
SQL: SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%FIFA%' )
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Which platform is the most popular in Europe?
Evidence: platform that is the most popular refers to platform_name WHERE MAX(num_sales); in Europe refers to region_name = 'Europe' ;
SQL: SELECT T.platform_name FROM ( SELECT T4.platform_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T1.region_name = 'Europe' ORDER BY T2.num_sales DESC LIMIT 1 ) t
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Who is the publisher of the game 2002 FIFA World Cup?
Evidence: who is the publisher refers to publisher_name; 2002 FIFA World Cup refers to game_name = '2002 FIFA World Cup';
SQL: SELECT T2.publisher_name FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id WHERE T3.game_name = '2002 FIFA World Cup'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: What platform is the game 3Xtreme available on?
Evidence: what platform refers to platform_name; 3Xtreme refers to game_name = '3Xtreme';
SQL: SELECT T2.platform_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T4.game_name = '3Xtreme'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: What genre is the game 2010 FIFA World Cup South Africa?
Evidence: genre refers to genre_name; 2010 FIFA World Cup South Africa refers to game_name = '2010 FIFA World Cup South Africa';
SQL: SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2010 FIFA World Cup South Africa'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Which region has the highest number of games sold on all platforms?
Evidence: which region refers to region_name; highest number of games sold on all platforms refers to MAX(SUM(num_sales));
SQL: SELECT T.region_name FROM ( SELECT T2.region_name, SUM(T1.num_sales) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id INNER JOIN game_platform AS T3 ON T1.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id GROUP BY T4.platform_name ORDER BY SUM(T1.num_sales) DESC LIMIT 1 ) t
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: How many games were sold on PS3 platform in Japan?
Evidence: how many games = MULTIPLY(SUM(num_sales), 100000); PS3 refers to platform_name = 'PS3'; Japan refers to region_name = 'Japan';
SQL: SELECT SUM(T1.num_sales * 100000) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id INNER JOIN game_platform AS T3 ON T1.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T2.region_name = 'Japan' AND T4.platform_name = 'PS3'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: What are the names of games that were released in 2007?
Evidence: names of games refers to game_name; released in 2007 refers to release_year = 2007;
SQL: SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2007
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: How many games were published by Activision?
Evidence: Activision refers to publisher_name = 'Activision';
SQL: SELECT COUNT(DISTINCT T3.id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id WHERE T2.publisher_name = 'Activision'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Indicate the release year of the game with more than 200000 sales in Japan.
Evidence: more than 200000 sales refers to SUM(num_sales) > 2; Japan refers to region_name = 'Japan';
SQL: SELECT DISTINCT T3.release_year FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id WHERE T2.num_sales * 100000 > 200000 AND T1.region_name = 'Japan'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: In 2010, how many PS3 games were released?
Evidence: in 2010 refers to release_year = 2010; PS3 refers to platform_name = 'PS3';
SQL: SELECT COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PS3' AND T2.release_year = 2010
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Indicate the publisher who has published the most games of all time.
Evidence: publisher refers to publisher_name; publisher who has published the most games of all time refers to MAX(COUNT(publisher_name));
SQL: SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T2.publisher_name ORDER BY COUNT(DISTINCT T1.game_id) DESC LIMIT 1 ) t
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: How many shooter games are there?
Evidence: shooter games refers to game_name WHERE genre_name = 'shooter';
SQL: SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Shooter'
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: What is the percentage of games that were released on PS4 in 2014 among all platforms?
Evidence: percentage - MULTIPLY(DIVIDE(SUM(platform_name = 'PS4'), COUNT(game_id)), 100); in 2014 refers to release_year = 2014;
SQL: SELECT CAST(COUNT(CASE WHEN T2.platform_name = 'PS4' THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id WHERE T1.release_year = 2014
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: How much are the sales of the games in region ID 4?
Evidence: how much are the sales = SUM(num_sales);
SQL: SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.region_id = 4
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: List down the game platform IDs of games with a region ID of 1.
SQL: SELECT T.game_platform_id FROM region_sales AS T WHERE T.region_id = 1
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Calculate the difference between sales of games from region ID 2 and region ID 3.
Evidence: difference = SUBTRACT(SUM(num_sales WHERE region_id = 2), SUM(num_sales WHERE region_id = 3));
SQL: SELECT SUM(CASE WHEN T.region_id = 2 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.region_id = 3 THEN T.num_sales ELSE 0 END) FROM region_sales t
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: List down the platform IDs of the games released in 2007.
Evidence: released in 2007 refers to release_year = 2007;
SQL: SELECT DISTINCT T.platform_id FROM game_platform AS T WHERE T.release_year = 2007
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: State the game publisher IDs of the games with a platform ID of 16.
SQL: SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 16
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: Calculate the number of game publisher IDs for games released in 1984.
Evidence: released in 1984 refers to release_year = 1984;
SQL: SELECT COUNT(T.game_publisher_id) FROM game_platform AS T WHERE T.release_year = 1984
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: List down the platform IDs of the games with a region ID of 3.
SQL: SELECT T2.id FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id WHERE T1.region_id = 3
Database: video_games
Tables: genre, game, platform, publisher, game_publisher, game_platform, region, region_sales
Columns (table index, column name): -1, *, 0, id, 0, genre_name, 1, id, 1, genre_id, 1, game_name, 2, id, 2, platform_name, 3, id, 3, publisher_name, 4, id, 4, game_id, 4, publisher_id, 5, id, 5, game_publisher_id, 5, platform_id, 5, release_year, 6, id, 6, region_name, 7, region_id, 7, game_platform_id, 7, num_sales
Question: What are the sales made by the games in Japan region?
Evidence: sales = SUM(num_sales); Japan region refers to region_name = 'Japan';
SQL: SELECT SUM(CASE WHEN T2.region_name = 'Japan' THEN T1.num_sales ELSE 0 END) AS nums FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id