Video games are big business: the global gaming market is projected to be worth more than $300 billion by 2027 according to Mordor Intelligence. With so much money at stake, the major game publishers are hugely incentivized to create the next big hit. But are games getting better, or has the golden age of video games already passed?
In this project, you'll analyze video game critic and user scores as well as sales data for the top 400 video games released since 1977. You'll search for a golden age of video games by identifying release years that users and critics liked best, and you'll explore the business side of gaming by looking at game sales data.
Your search will involve joining datasets and comparing results with set theory. You'll also filter, group, and order data. Make sure you brush up on these skills before trying this project! The database contains two tables. Each table has been limited to 400 rows for this project, but you can find the complete dataset with over 13,000 games on Kaggle.
games
Schema
games
SchemaTo access any of the tables, you will need to reference the games
schema within your queries. For example:
SELECT * FROM games.game_sales LIMIT 10;
Tables
game_sales
table
game_sales
tableColumn | Definition | Data Type |
---|---|---|
name | Name of the video game | varchar |
platform | Gaming platform | varchar |
publisher | Game publisher | varchar |
developer | Game developer | varchar |
games_sold | Number of copies sold (millions) | float |
year | Release year | int |
reviews
table
reviews
tableColumn | Definition | Data Type |
---|---|---|
name | Name of the video game | varchar |
critic_score | Critic score according to Metacritic | float |
user_score | User score according to Metacritic | float |
users_avg_year_rating
table
users_avg_year_rating
tableColumn | Definition | Data Type |
---|---|---|
year | Release year of the games reviewed | int |
num_games | Number of games released that year | int |
avg_user_score | Average score of all the games ratings for the year | float |
critics_avg_year_rating
table
critics_avg_year_rating
tableColumn | Definition | Data Type |
---|---|---|
year | Release year of the games reviewed | int |
num_games | Number of games released that year | int |
avg_critic_score | Average score of all the games ratings for the year | float |
-- best_selling_games
SELECt *
FROM games.game_sales
ORDER BY games.game_sales.games_sold DESC
LIMIT 10;
-- critics_top_ten_years
SELECT
gs.year,
COUNT(gs.name) AS num_games,
ROUND(AVG(gw.critic_score), 2) AS avg_critic_score
FROM games.game_sales AS gs
INNER JOIN games.reviews AS gw
ON gs.name = gw.name
GROUP BY gs.year
HAVING COUNT(gs.name) >= 4
ORDER BY avg_critic_score DESC
LIMIT 10;
-- golden_years
SELECT
gc.year,
COUNT(gc.num_games) AS num_games,
ROUND(gc.avg_critic_score, 2) AS avg_critic_score,
ROUND(gu.avg_user_score, 2) AS avg_user_score,
gc.avg_critic_score - gu.avg_user_score AS diff
FROM games.critics_avg_year_rating AS gc
INNER JOIN games.users_avg_year_rating AS gu
ON gc.year = gu.year
WHERE gc.avg_critic_score > 9 OR gu.avg_user_score > 9
GROUP BY gc.year, gc.avg_critic_score, gu.avg_user_score
ORDER BY gc.year ASC