Back to Editor

Solution: 24. Number of Videos per Channel

Medium

Problem Detail:

Write a SQL query to count how many videos each channel has in the videos table.

Answer SQL Query:

SELECT channel_id, COUNT(*) AS total_videos
FROM videos
GROUP BY channel_id
ORDER BY total_videos DESC;
You can easily copy this solution, switch back to your editor tab, paste it, and run the SQL!