Get top 5 genres in the platform with most positive user activity, i.e., the genres with videos having more number of likes.
Note:
Consider the reaction_type LIKE as liked.
• If a video belongs to 3 genres, then the likes of the video is counted in all the 3 genres.
• Sort the output in the descending order of no_of_likes, and then in the ascending order of the genre_type.
Expected Output Format
genre id
genre typa
no of likes
SELECT vd.user_id as activeUser
FROM quiz.view_details as vd, quiz.reaction as r
where vd.reaction_type="like" and count(r.id=r.vid)>50
group by vd.user_id asc;
Comments
Leave a comment