How have genres and their ratings evolved over time?
Genres are unnested from IMDb's raw comma-separated strings and rolled up into 10 buckets, then plotted by year against average rating. Documentary holds the deepest, most sustained color, meaning consistently higher average ratings across nearly the full century, while Horror & Thriller stays lighter throughout, rating consistently lower even as its volume of titles grows in later decades. Animation tells a different story: it peaked in the 1950s–60s (~7.1) and has drifted gently downward ever since, settling around 6.8 in the 2020s as output volume climbed sharply.

+ View SQL
WITH GenreExpansions AS (
SELECT
imdb_basic.tconst,
UNNEST(STRING_TO_ARRAY(genres, ',')) AS genre_split,
startyear,
averagerating
FROM imdb_basic JOIN imdb_ratings ON imdb_basic.tconst = imdb_ratings.tconst
)
SELECT
genre_split,
startyear,
COUNT(tconst) AS title_count,
AVG(averagerating) AS average_rating
FROM GenreExpansions
JOIN imdb_akas ON imdb_akas.titleid = GenreExpansions.tconst
JOIN imdb_country_codes ON imdb_country_codes.region_code = imdb_akas.region
WHERE language = 'en' AND region_name != 'Unknown'
GROUP BY genre_split, startyear
ORDER BY genre_split, startyear;