Answer to Question #329352 in Databases | SQL | Oracle | MS Access for Bylapati suresh kumar

Question #329352

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.


1
Expert's answer
2022-04-16T06:47:56-0400
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;

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