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: What percentage of games are sports?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(genre_name = 'sport'), COUNT(game_name)), 100.0); sports refers to genre_name = 'sport';
SQL: SELECT CAST(COUNT(CASE WHEN T1.genre_name = 'Sports' THEN T2.id ELSE NULL END) AS REAL) * 100 / COUNT(T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_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 ratio of game sales between North America and Japan?
Evidence: ratio = DIVIDE(SUM(num_sales WHERE region_name = 'North America'), SUM(num_sales WHERE region_name = 'Japan')); North America refers to region_name = 'North America'; Japan refers to region_name = 'Japan';
SQL: SELECT SUM(CASE WHEN T2.region_name = 'North America' THEN T1.num_sales ELSE 0 END) / SUM(CASE WHEN T2.region_name = 'Japan' THEN T1.num_sales ELSE 0 END) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.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: Which year has the most number of video game releases?
Evidence: year that has the most number of video game releases refers to MAX(COUNT(release_year));
SQL: SELECT T1.release_year FROM ( SELECT T.release_year, COUNT(id) FROM game_platform AS T GROUP BY T.release_year ORDER BY COUNT(T.id) DESC LIMIT 1 ) T1
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 video game publishers have Interactive in their names?
Evidence: publishers that have Interactive in their names refers to publisher_name LIKE '%Interactive%';
SQL: SELECT COUNT(T.id) FROM publisher AS T WHERE T.publisher_name LIKE '%Interactive%'
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 top 2 platforms with the most sales in North America?
Evidence: platforms refers to platform_name; most sales refers to MAX(num_sales); North America refers to region_name = 'North America';
SQL: 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 = 'North America' ORDER BY T2.num_sales DESC LIMIT 2
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 did BMG Interactive Entertainment release in 2012?
Evidence: BMG Interactive Entertainment refers to publisher_name = 'BMG Interactive Entertainment'; release in 2012 refers to release_year = 2012;
SQL: SELECT COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T3.release_year = 2012
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 name of the publisher that released the most video games in 2007?
Evidence: name of the publisher refers to publisher_name; publisher that released the most video games in 2007 refers to MAX(COUNT(publisher_name)) WHERE release_year = 2007;
SQL: SELECT T3.publisher_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.release_year = 2007 GROUP BY T3.publisher_name ORDER BY COUNT(DISTINCT T2.game_id) DESC LIMIT 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 publishers published the Minecraft game?
Evidence: Minecraft refers to game_name = 'Minecraft';
SQL: SELECT COUNT(T2.publisher_id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id WHERE T1.game_name = 'Minecraft'
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 number of Action games?
Evidence: which publisher refers to publisher_name; publisher that has published the most number of Action games refers to MAX(COUNT(publisher_name)) WHERE genre_name = 'Action'; Action games refers to game_name WHERE genre_name = 'Action';
SQL: SELECT T.publisher_name FROM ( SELECT T4.publisher_name, COUNT(DISTINCT T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id INNER JOIN game_publisher AS T3 ON T2.id = T3.game_id INNER JOIN publisher AS T4 ON T3.publisher_id = T4.id WHERE T1.genre_name = 'Action' GROUP BY T4.publisher_name ORDER BY COUNT(DISTINCT T2.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 Sports games did Nintendo publish?
Evidence: Sports games refers to game_name WHERE genre_name = 'Sports'; Nintendo refers to publisher_name = 'Nintendo';
SQL: SELECT 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 = 'Sports' AND T1.publisher_name = 'Nintendo'
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 genre of the game '2 Games in 1: Sonic Advance & ChuChu Rocket!'?
Evidence: genre refers to genre_name; '2 Games in 1: Sonic Advance & ChuChu Rocket!' is a game name;
SQL: SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2 Games in 1: Sonic Advance & ChuChu Rocket!'
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 times did other regions make positive sales in DS platform?
Evidence: other regions refers to region_name = 'Other'; positive sales refers to num_sales > 0; DS platform refers to platform_name = 'DS';
SQL: SELECT COUNT(DISTINCT T2.id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id WHERE T1.platform_name = 'DS' AND T4.region_name = 'Other' AND T3.num_sales > 0
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 the games published by American Softworks?
Evidence: names of the games refers to game_name; American Softworks refers to publisher_name = 'American Softworks';
SQL: SELECT T3.game_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 T1.publisher_name = 'American Softworks'
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 strategy games are there?
Evidence: strategy games refers game_name WHERE genre_name = 'Strategy';
SQL: SELECT COUNT(CASE WHEN T1.genre_name = 'Strategy' THEN T2.id ELSE NULL END) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_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: Which publisher published Overwatch?
Evidence: which publisher refers to publisher_name; Overwatch refers to game_name = 'Overwatch';
SQL: SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = 'Overwatch'
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 name of the genre with the most number of video games?
Evidence: name of the genre refers to genre_name; genre with the most number of video games refers to MAX(COUNT(genre_name));
SQL: SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T2.id = T1.genre_id GROUP BY T2.genre_name ORDER BY COUNT(T1.genre_id) DESC LIMIT 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: What is the number of games sold in Europe for game platform ID 26?
Evidence: total number of games sold = MULTIPLY(num_sales, 100000); Europe refers to region_name = 'Europe';
SQL: SELECT T2.num_sales * 100000 AS nums_eur FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T2.game_platform_id = 26 AND T1.region_name = 'Europe'
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 released in the year 2001?
Evidence: released in the year 2001 refers to release_year = 2001;
SQL: SELECT COUNT(id) FROM game_platform AS T WHERE T.release_year = 2001
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 include the word 'Box' in their name?
Evidence: games include the word 'Box' in their name refers to game_name = '%Box%';
SQL: SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%Box%' )
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 three largest numbers of games sold?
Evidence: 3 largest numbers of games sold refers to game_name where MAX(num_sales) LIMIT 3;
SQL: SELECT T.game_platform_id, SUM(T.num_sales) * 100000 FROM region_sales AS T GROUP BY game_platform_id ORDER BY SUM(T.num_sales) * 100000 DESC LIMIT 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 year were the first game released?
Evidence: year the first game was released refers to MIN(release_year);
SQL: SELECT T.release_year FROM game_platform AS T ORDER BY T.release_year ASC LIMIT 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: What publishers have the word 'Entertainment' in their name?
Evidence: publishers that have the word 'Entertainment' in their name refers to publisher_name LIKE '%Entertainment%';
SQL: SELECT T.publisher_name FROM publisher AS T WHERE T.publisher_name LIKE '%Entertainment%'
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 name of all adventure games.
Evidence: name of games refers to game_name; adventure games refers to game_name WHERE genre_name = 'Adventure';
SQL: SELECT T2.game_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name = 'Adventure'
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 the name of all games published by 'Pioneer LDC'.
Evidence: name of games refers to game_name; 'Pioneer LDC' refers to publisher_name = 'Pioneer LDC';
SQL: SELECT T3.game_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 T1.publisher_name = 'Pioneer LDC'
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 name of all the games published for the 'SCD' platform.
Evidence: name of games refers to game_name;  'SCD' platform refers to platform_name = 'SCD';
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 INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T4.platform_name = 'SCD'
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 the name of all games published in Japan.
Evidence: name of games refers to game_name; Japan refers to region_name = 'Japan';
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 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 T5.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: What genres are the games published by 'Agatsuma Entertainment'?
Evidence: genres refers to genre_name; 'Agatsuma Entertainment' refers to publisher_name = 'Agatsuma Entertainment';
SQL: SELECT T4.genre_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 INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T1.publisher_name = 'Agatsuma Entertainment'
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 are not of the genres 'Role-Playing', 'Shooter' and 'Simulation'?
Evidence: not of the genres 'Role-Playing', 'Shooter' and 'Simulation' refers to genre_name NOT IN ('Role-Playing', 'Shooter', 'Simulation');
SQL: SELECT COUNT(T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name NOT IN ('Role-Playing', 'Shooter', 'Simulation')
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, by region, which platform has sold the most games.
Evidence: region refers to region_name; platform refers to game_platform; sold the most games refers to MAX(SUM(num_sales));
SQL: SELECT T.region_name FROM ( SELECT T1.platform_name, T4.region_name, SUM(T3.num_sales) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id GROUP BY T1.platform_name, T4.region_name ORDER BY SUM(T3.num_sales) DESC LIMIT 1 ) t