db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
0
673
SQL
stringlengths
23
804
question_id
int64
0
9.43k
difficulty
stringclasses
1 value
video_games
Which is the publisher for the game "Prism: Light the Way"?
publisher refers to publisher_name; game "Prism: Light the Way" refers to game_name = 'Prism: Light the Way'
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 = 'Prism: Light the Way'
3,400
video_games
List the platforms that release the most games each year.
platform refers to platform_id; the most games refers to max(count(game_publisher_id))
SELECT T1.platform_name 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 GROUP BY T2.release_year, T1.platform_name ORDER BY COUNT(DISTINCT T3.game_id) DESC
3,401
video_games
How many games do not have any sales in Europe?
do not have any sales refers to num_sales = 0; in Europe refers to region_name = 'Europe'
SELECT COUNT(*) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id WHERE T2.region_name = 'Europe' AND T1.num_sales = 0
3,402
video_games
What are the games that were released in 2006?
game refers to game_name; released in 2006 refers to release_year = 2006
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 = 2006
3,403
video_games
What is the genre of the game "Mario vs. Donkey Kong"?
genre refers to genre_name; game "Mario vs. Donkey Kong" refers to game_name = 'Mario vs. Donkey Kong'
SELECT T1.genre_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T2.game_name = 'Mario vs. Donkey Kong'
3,404
video_games
Which publisher published the most games?
publisher refers to publisher_name; the most games refers to max(count(game_id))
SELECT T.publisher_name FROM ( SELECT T1.publisher_name, COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id GROUP BY T1.publisher_name ORDER BY COUNT(DISTINCT T2.game_id) DESC LIMIT 1 ) t
3,405
video_games
List all the platform games.
platform game refers to genre_name = 'Platform'; game refers to game_name
SELECT T2.game_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name = 'Platform'
3,406
video_games
What are the years that "WiiU" got a new game?
year refers to release_year; "WiiU" refers to platform_name = 'WiiU'
SELECT T2.release_year FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id WHERE T1.platform_name = 'WiiU' ORDER BY T2.release_year DESC LIMIT 1
3,407
video_games
Which game has the most sales in Japan?
which game refers to game_name; most sales refers to MAX(num_sales); Japan refers to region_name = 'Japan';
SELECT T5.game_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 game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN game AS T5 ON T4.game_id = T5.id WHERE T1.region_name = 'Japan' ORDER BY T2.num_sales DESC LIMIT 1
3,408
video_games
List the games from the publisher "Activision".
games refers to game_name; "Activision" refers to publisher_name = 'Activision';
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 = 'Activision'
3,409
video_games
How many different publishers have published a game that starts with "Marvel"?
game that starts with "Marvel" refers to game_name LIKE 'Marvel%';
SELECT COUNT(DISTINCT T1.publisher_id) FROM game_publisher AS T1 INNER JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.game_name LIKE 'Marvel%'
3,410
video_games
What percentage of games are sports?
percentage = MULTIPLY(DIVIDE(SUM(genre_name = 'sport'), COUNT(game_name)), 100.0); sports refers to genre_name = 'sport';
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
3,411
video_games
What is the ratio of game sales between North America and Japan?
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';
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
3,412
video_games
Which year has the most number of video game releases?
year that has the most number of video game releases refers to MAX(COUNT(release_year));
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
3,413
video_games
How many video game publishers have Interactive in their names?
publishers that have Interactive in their names refers to publisher_name LIKE '%Interactive%';
SELECT COUNT(T.id) FROM publisher AS T WHERE T.publisher_name LIKE '%Interactive%'
3,414
video_games
What are the top 2 platforms with the most sales in North America?
platforms refers to platform_name; most sales refers to MAX(num_sales); North America refers to region_name = 'North America';
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
3,415
video_games
How many games did BMG Interactive Entertainment release in 2012?
BMG Interactive Entertainment refers to publisher_name = 'BMG Interactive Entertainment'; release in 2012 refers to release_year = 2012;
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
3,416
video_games
What is the name of the publisher that released the most video games in 2007?
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;
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
3,417
video_games
How many publishers published the Minecraft game?
Minecraft refers to game_name = 'Minecraft';
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'
3,418
video_games
Which publisher has published the most number of Action games?
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';
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
3,419
video_games
How many Sports games did Nintendo publish?
Sports games refers to game_name WHERE genre_name = 'Sports'; Nintendo refers to publisher_name = 'Nintendo';
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'
3,420
video_games
What is the genre of the game '2 Games in 1: Sonic Advance & ChuChu Rocket!'?
genre refers to genre_name; '2 Games in 1: Sonic Advance & ChuChu Rocket!' is a game name;
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!'
3,421
video_games
How many times did other regions make positive sales in DS platform?
other regions refers to region_name = 'Other'; positive sales refers to num_sales > 0; DS platform refers to platform_name = 'DS';
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
3,422
video_games
What are the names of the games published by American Softworks?
names of the games refers to game_name; American Softworks refers to publisher_name = 'American Softworks';
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'
3,423
video_games
How many strategy games are there?
strategy games refers game_name WHERE genre_name = 'Strategy';
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
3,424
video_games
Which publisher published Overwatch?
which publisher refers to publisher_name; Overwatch refers to game_name = 'Overwatch';
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'
3,425
video_games
What is the name of the genre with the most number of video games?
name of the genre refers to genre_name; genre with the most number of video games refers to MAX(COUNT(genre_name));
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
3,426
video_games
What is the number of games sold in Europe for game platform ID 26?
total number of games sold = MULTIPLY(num_sales, 100000); Europe refers to region_name = 'Europe';
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'
3,427
video_games
How many games were released in the year 2001?
released in the year 2001 refers to release_year = 2001;
SELECT COUNT(id) FROM game_platform AS T WHERE T.release_year = 2001
3,428
video_games
How many games include the word 'Box' in their name?
games include the word 'Box' in their name refers to game_name = '%Box%';
SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%Box%' )
3,429
video_games
What are the three largest numbers of games sold?
3 largest numbers of games sold refers to game_name where MAX(num_sales) LIMIT 3;
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
3,430
video_games
What year were the first game released?
year the first game was released refers to MIN(release_year);
SELECT T.release_year FROM game_platform AS T ORDER BY T.release_year ASC LIMIT 1
3,431
video_games
What publishers have the word 'Entertainment' in their name?
publishers that have the word 'Entertainment' in their name refers to publisher_name LIKE '%Entertainment%';
SELECT T.publisher_name FROM publisher AS T WHERE T.publisher_name LIKE '%Entertainment%'
3,432
video_games
Indicate the name of all adventure games.
name of games refers to game_name; adventure games refers to game_name WHERE genre_name = 'Adventure';
SELECT T2.game_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name = 'Adventure'
3,433
video_games
List the name of all games published by 'Pioneer LDC'.
name of games refers to game_name; 'Pioneer LDC' refers to publisher_name = 'Pioneer LDC';
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'
3,434
video_games
Indicate the name of all the games published for the 'SCD' platform.
name of games refers to game_name;  'SCD' platform refers to platform_name = 'SCD';
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'
3,435
video_games
List the name of all games published in Japan.
name of games refers to game_name; Japan refers to region_name = 'Japan';
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'
3,436
video_games
What genres are the games published by 'Agatsuma Entertainment'?
genres refers to genre_name; 'Agatsuma Entertainment' refers to publisher_name = 'Agatsuma Entertainment';
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'
3,437
video_games
How many games are not of the genres 'Role-Playing', 'Shooter' and 'Simulation'?
not of the genres 'Role-Playing', 'Shooter' and 'Simulation' refers to genre_name NOT IN ('Role-Playing', 'Shooter', 'Simulation');
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')
3,438
video_games
Indicate, by region, which platform has sold the most games.
region refers to region_name; platform refers to game_platform; sold the most games refers to MAX(SUM(num_sales));
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
3,439
video_games
Which publisher has published the most games in the 'Puzzle' genre?
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';
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
3,440
video_games
Which game has sold the fewest units?
which game refers to game_name; sold the fewest units refers to MIN(num_sales);
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
3,441
video_games
Which publisher has published the game 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3'?
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';
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'
3,442
video_games
In which regions has the game 'Pengo' been sold?
which regions refers to region_name; 'Pengo' refers to game_name = 'Pengo';
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'
3,443
video_games
List by name all the games released in the year 2010.
name of the games refers to game_name; released in the year 2010 refers to release_year = 2010;
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'
3,444
video_games
Calculate the average game sales for the PS2 platform.
average = AVG(MULTIPLY(num_sales), 100000); PS2 refers to platform_name = 'PS2';
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'
3,445
video_games
Calculate the percentage of games published by 'Brash Entertainment'?
percentage = MULTIPLY(DIVIDE(SUM(publisher_name = 'Brash Entertainment'), COUNT(game_id)), 100.0); 'Brash Entertainment' refers to publisher_name = 'Brash Entertainment';
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
3,446
video_games
What is the total number of games sold in region ID 1?
total number of games sold = MULTIPLY(SUM(num_sales), 100000);
SELECT SUM(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 1
3,447
video_games
How many FIFA games are there across all platforms?
FIFA games refers to game_name LIKE '%FIFA%';
SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%FIFA%' )
3,448
video_games
Which platform is the most popular in Europe?
platform that is the most popular refers to platform_name WHERE MAX(num_sales); in Europe refers to region_name = 'Europe' ;
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
3,449
video_games
Who is the publisher of the game 2002 FIFA World Cup?
who is the publisher refers to publisher_name; 2002 FIFA World Cup refers to game_name = '2002 FIFA World Cup';
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'
3,450
video_games
What platform is the game 3Xtreme available on?
what platform refers to platform_name; 3Xtreme refers to game_name = '3Xtreme';
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'
3,451
video_games
What genre is the game 2010 FIFA World Cup South Africa?
genre refers to genre_name; 2010 FIFA World Cup South Africa refers to game_name = '2010 FIFA World Cup South Africa';
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'
3,452
video_games
Which region has the highest number of games sold on all platforms?
which region refers to region_name; highest number of games sold on all platforms refers to MAX(SUM(num_sales));
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
3,453
video_games
How many games were sold on PS3 platform in Japan?
how many games = MULTIPLY(SUM(num_sales), 100000); PS3 refers to platform_name = 'PS3'; Japan refers to region_name = 'Japan';
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'
3,454
video_games
What are the names of games that were released in 2007?
names of games refers to game_name; released in 2007 refers to release_year = 2007;
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
3,455
video_games
How many games were published by Activision?
Activision refers to publisher_name = 'Activision';
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'
3,456
video_games
Indicate the release year of the game with more than 200000 sales in Japan.
more than 200000 sales refers to SUM(num_sales) > 2; Japan refers to region_name = 'Japan';
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'
3,457
video_games
In 2010, how many PS3 games were released?
in 2010 refers to release_year = 2010; PS3 refers to platform_name = 'PS3';
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
3,458
video_games
Indicate the publisher who has published the most games of all time.
publisher refers to publisher_name; publisher who has published the most games of all time refers to MAX(COUNT(publisher_name));
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
3,459
video_games
How many shooter games are there?
shooter games refers to game_name WHERE genre_name = 'shooter';
SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Shooter'
3,460
video_games
What is the percentage of games that were released on PS4 in 2014 among all platforms?
percentage - MULTIPLY(DIVIDE(SUM(platform_name = 'PS4'), COUNT(game_id)), 100); in 2014 refers to release_year = 2014;
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
3,461
video_games
How much are the sales of the games in region ID 4?
how much are the sales = SUM(num_sales);
SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.region_id = 4
3,462
video_games
List down the game platform IDs of games with a region ID of 1.
SELECT T.game_platform_id FROM region_sales AS T WHERE T.region_id = 1
3,463
video_games
Calculate the difference between sales of games from region ID 2 and region ID 3.
difference = SUBTRACT(SUM(num_sales WHERE region_id = 2), SUM(num_sales WHERE region_id = 3));
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
3,464
video_games
List down the platform IDs of the games released in 2007.
released in 2007 refers to release_year = 2007;
SELECT DISTINCT T.platform_id FROM game_platform AS T WHERE T.release_year = 2007
3,465
video_games
State the game publisher IDs of the games with a platform ID of 16.
SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 16
3,466
video_games
Calculate the number of game publisher IDs for games released in 1984.
released in 1984 refers to release_year = 1984;
SELECT COUNT(T.game_publisher_id) FROM game_platform AS T WHERE T.release_year = 1984
3,467
video_games
List down the platform IDs of the games with a region ID of 3.
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
3,468
video_games
What are the sales made by the games in Japan region?
sales = SUM(num_sales); Japan region refers to region_name = 'Japan';
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
3,469
video_games
How many game publisher IDs have published games on the X360 platform?
X360 refers to platform_name = 'X360';
SELECT COUNT(T1.game_publisher_id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id WHERE T2.platform_name = 'X360'
3,470
video_games
State the name of the platforms for games released in 2000.
name of the platforms refers to platform_name; released in 2000 refers to release_year = 2000;
SELECT DISTINCT T2.platform_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id WHERE T1.release_year = 2000
3,471
video_games
Find out the difference between the number of publishers who released the games on the PS3 and X360.
difference = SUBTRACT(SUM(platform_name = 'PS3'), SUM(platform_name = 'X360')); PS3 refers to platform_name = 'PS3'; X360 refers to platform_name = 'X360';
SELECT COUNT(CASE WHEN T2.platform_name = 'PS3' THEN T1.game_publisher_id ELSE NULL END) - COUNT(CASE WHEN T2.platform_name = 'X360' THEN T1.game_publisher_id ELSE NULL END) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id
3,472
video_games
What are the game IDs of the games published by Bethesda Softworks?
Bethesda Softworks refers to publisher_name = 'Bethesda Softworks';
SELECT T1.game_id FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Bethesda Softworks'
3,473
video_games
Calculate the total number of IDs for the game published by Capcom and Sony Computer Entertainment.
Capcom refers to publisher_name = 'Capcom';  Sony Computer Entertainment refers to publisher_name = 'Sony Computer Entertainment';
SELECT COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name IN ('Capcom', 'Sony Computer Entertainment')
3,474
video_games
What is the genre of the game "Grand Theft Auto V"?
genre refers to genre_name; "Grand Theft Auto V" refers to game_name = 'Grand Theft Auto V';
SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = 'Grand Theft Auto V'
3,475
video_games
List down the names of the games in the racing genre.
name of games refers to game_name; racing genre refers to genre_name = 'Racing';
SELECT T1.game_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Racing'
3,476
video_games
Calculate the number of games in the fighting genre.
fighting genre refers to genre_name = 'Fighting';
SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Fighting'
3,477
video_games
What are the genres of games published by the publisher with an ID of 464?
genres of games refers to genre_name; publisher with an ID of 464 refers to publisher_id = 464;
SELECT DISTINCT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id INNER JOIN game_publisher AS T3 ON T1.id = T3.game_id WHERE T3.publisher_id = 464
3,478
video_games
Find out the platform of the game "Final Fantasy XIII-2".
platform of the game refers to platform_name; "Final Fantasy XIII-2" refers to game_name = 'Final Fantasy XIII-2';
SELECT T4.platform_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 T1.game_name = 'Final Fantasy XIII-2'
3,479
video_games
Calculate the total sales made by the games released in 2000.
total sales = SUM(num_sales); released in 2000 refers to release_year = 2000;
SELECT SUM(T1.num_sales) FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id WHERE T2.release_year = 2000
3,480
video_games
Calculate the difference in sales between the games released in 1990 and 2000.
difference = SUBTRACT(SUM(num_sales WHERE release_year = 2000), SUM(num_sales WHERE release_year = 1990));
SELECT SUM(CASE WHEN T2.release_year = 2000 THEN T1.num_sales ELSE 0 END) - SUM(CASE WHEN T2.release_year = 1990 THEN T1.num_sales ELSE 0 END) FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id
3,481
video_games
What are the platform IDs of records released in 2006?
released in 1990 refers to release_year = 1990; 2000 refers to release_year = 2000;
SELECT DISTINCT T.platform_id FROM game_platform AS T WHERE T.release_year = 2006
3,482
video_games
Compute the average number of sales in region ID 3.
average = AVG(MULTIPLY(num_sales, 100000));
SELECT AVG(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 3
3,483
video_games
In which year did the record ID 19 with game publisher ID 6657 released?
which year refers to release_year; record ID 19 refers to game platform.id; id = 19
SELECT T.release_year FROM game_platform AS T WHERE T.game_publisher_id = 6657 AND T.id = 19
3,484
video_games
Calculate the total sales in all regions with game platform ID 66.
total sales in all regions = MULTIPLY(SUM(num_sales), 100000);
SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.game_platform_id = 66
3,485
video_games
Give the game name of the game ID 44.
SELECT T.game_name FROM game AS T WHERE T.id = 44
3,486
video_games
List the games available on Wii.
games available refers to game_name; Wii refers to platform_name = 'Wii';
SELECT T4.game_name 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 INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T1.platform_name = 'Wii'
3,487
video_games
Provide the name of games released in 2015.
names of games refers to game_name; released in 2015 refers to release_year = 2015;
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 = 2015
3,488
video_games
What is the total number of adventure games released in 2005?
adventure games refers to game_name WHERE genre_name = 'Adventure'; released in 2005 refers to release_year = 2005;
SELECT COUNT(DISTINCT T3.id) 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 INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Adventure' AND T1.release_year = 2005
3,489
video_games
What is the name of the company that produced the game titled Adventure Time: Explore the Dungeon Because I Don't Know!?
name of the company that produced the game refers to publisher_name; Adventure Time: Explore the Dungeon Because I Don't Know! Refers to game_name = 'Adventure Time: Explore the Dungeon Because I Don''t Know!';
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 = 'Adventure Time: Explore the Dungeon Because I Don''t Know!'
3,490
video_games
List down the game platform ID and region name where the games achieved 20000 sales and below.
20000 sales and below refers to num_sales < 0.2;
SELECT T2.game_platform_id, T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T2.num_sales * 100000 <= 20000
3,491
video_games
Provide the name of game produced by 505 Games in 2006.
name of game refers to game_name; 505 Games refers to publisher_name = '505 Games'; in 2006 refers to release_year = 2006;
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 INNER JOIN publisher AS T4 ON T2.publisher_id = T4.id WHERE T4.publisher_name = '505 Games' AND T1.release_year = 2006
3,492
video_games
What is the genre of the game ID 119?
genre of the game refers to genre_name; game ID 119 refers to game.id = 119;
SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.id = 119
3,493
video_games
List the game IDs of the games produced by Abylight.
Abylight refers to publisher_name = 'Abylight';
SELECT T1.game_id FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Abylight'
3,494
video_games
In which region where a game had the lowest number of sales?
which region refers to region_name; lowest number of sales refers to MIN(num_sales);
SELECT DISTINCT T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id ORDER BY T2.num_sales LIMIT 1
3,495
video_games
List down the name of strategy games.
strategy games refers to game_name WHERE genre_name = 'Strategy';
SELECT T1.game_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Strategy'
3,496
video_games
In what platform does the game ID 178 available?
platform refers to platform_name;
SELECT T3.platform_name FROM game_publisher AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.game_publisher_id INNER JOIN platform AS T3 ON T2.platform_id = T3.id WHERE T1.game_id = 178
3,497
video_games
Give the genre of the following game titled 'Airlock' , 'Airline Tycoon' , and 'Airblade', respectively.
genre refers to genre_name; 'Airlock', 'Airline Tycoon' , and 'Airblade' refers to game_name IN ('Airlock', 'Airline Tycoon', 'Airblade');
SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name IN ('Airlock', 'Airline Tycoon', 'Airblade')
3,498
video_games
Calculate the total number of sales in North America.
total number of sales = MULTIPLY(SUM(num_sales), 100000); North America refers to region_name = 'North America';
SELECT SUM(T2.num_sales) * 100000 AS nums FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'North America'
3,499