turbot/imdb

Query: imdb_movie_genre_popularity_by_age_group

Usage

powerpipe query imdb.query.imdb_movie_genre_popularity_by_age_group

SQL

select
g.genre,
sum(cast(i.cvotesu18 as integer)) as "under_18",
sum(cast(i.cvotes1829 as integer)) as "18_29",
sum(cast(i.cvotes3044 as integer)) as "30_44",
sum(cast(i.cvotes45a as integer)) as "45_plus"
from
imdb i
join genre g on i.movie_id = g.movie_id
group by
g.genre
order by
"under_18", "18_29", "30_44", "45_plus" desc;

Dashboards

The query is used in the dashboards: