Answer to Question #176187 in Databases | SQL | Oracle | MS Access for ghyuar

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

.... ... ..


1
Expert's answer
2021-03-31T04:33:33-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS