Answer to Question #284165 in Databases | SQL | Oracle | MS Access for Lovely

Question #284165

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


1
Expert's answer
2022-01-16T04:25:53-0500
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