channel_user table
channel_id user_id subscribed_datetime
100 1 2020-12-10 10:30:45
100 7 2020-10-10 11:30:45
channel_user table stores the data of the channel_ids and their subscribers' user_ids.
user_likes table
user_id video_id reaction_type reacted_at
1 10 LIKE 2020-12-10 10:30:45
7 10 DISLIKE 2020-10-10 11:30:45
video_genre table
video_id genre_id
10 201
10 202
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.
Consider reaction_type LIKE as liked
Sort the output in the ascending order of user_id.
Expected Output Format
user_id
...
CREATE TABLE TestTable AS
SELECT customername, contactnameFROM customers;
Comments
Leave a comment