Question #176187

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_type no_of_likes

.... ... ..


Expert's answer

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;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS