Back to problems

Compute article-type diversity per user and histogram

SQL · LinkedIn · Medium

You are given two tables containing article view events and article metadata. Table article_views: user_id — the viewer article_id — the article that was viewed view_date — the date of the view Table articles: article_id — primary key article_type — category or type of the article For the single day 2019-01-01, compute the following: For every user who viewed at least one article on that day, return the number of distinct article_type values among the articles they viewed.…

Checking your access…