Get all the distinct user_ids who liked at least one video uploaded by Android Authority channel (channel_id=364) but didn't like the video uploaded by Tech savvy channel with video_id =1005.
Note : consider reaction_type as liked
Sort the output in the ascending order of user_id by using subquries
SELECT DISTINCT user_ids FROM VIDEO V WHERE V.channel_id IN
(SELECT channel_id FROM VIDEO WHERE V.channel_id = 364 AND V.video_id IS NOT 1005
AND V.reaction_type = 'liked' ) ORDER BY V.user_id ASC;
Comments
Leave a comment