This is the code for Getting all the channel_ids that uploaded at least one video in "AI/ML" or "Robotics" technologies between 2018 and 2021.
SELECT
DISTINCT channel_id
FROM
video
WHERE
video_id >= 1
AND name LIKE '%AI/ML%'
OR name LIKE '%Robotics%'
AND strftime('%Y', published_datetime) BETWEEN "2018"
AND "2021"
GROUP BY
channel_id
ORDER BY
channel_id ASC;
Output Table:
channel_id 351 353 364 365 377
But,
How can I Get all the channel_ids that uploaded at least 20 videos in "AI/ML", "Cyber Security", "Data Science" or "Robotics" technologies between 2018 and 2021.
Example: If a channel publishes 5 videos in AI/ML, 10 videos in Cyber Security and 5 videos in Data Science, consider the channel
the table data is very huge so, I cant send the complete table data.
please help me.
select video_content.channelid
FROM quiz.video_content inner join user_details u on quiz.video_id=u.user_id
WHERE count(u.user_id) >= 20 AND name like '%DIY%' OR name LIKE '%Robotics%'
"2018" AND "2021" GROUP BY video_content.channelid
ORDER BY video_content.channelid ASC;
Comments
Leave a comment