-- Database schema
| genre : id [ INTEGER ] primary_key , genre_name [ TEXT ] | game : id [ INTEGER ] primary_key , genre_id [ INTEGER ] game.genre_id = genre.id , game_name [ TEXT ] | platform : id [ INTEGER ] primary_key , platform_name [ TEXT ] | publisher : id [ INTEGER ] primary_key , publisher_name [ TEXT ] | game_publisher : id [ INTEGER ] primary_key , game_id [ INTEGER ] game_publisher.game_id = game.id , publisher_id [ INTEGER ] game_publisher.publisher_id = publisher.id | game_platform : id [ INTEGER ] primary_key , game_publisher_id [ INTEGER ] game_platform.game_publisher_id = game_publisher.id , platform_id [ INTEGER ] game_platform.platform_id = platform.id , release_year [ INTEGER ] | region : id [ INTEGER ] primary_key , region_name [ TEXT ] | region_sales : region_id [ INTEGER ] region_sales.region_id = region.id , game_platform_id [ INTEGER ] region_sales.game_platform_id = game_platform.id , num_sales [ REAL ] |
-- -- Which region has the highest number of games sold on all platforms?

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;