The Literary Digest, a prominent publishing house, wants to identify their most...
The Literary Digest, a prominent publishing house, wants to identify their most successful authors based on article performance. An author's success is measured by their average pageviews per article over the last 6 months. However, to ensure statistical significance, only authors who have published at least 3 articles in this period should be considered. For each qualifying author, calculate their average pageviews per article and rank them. Return the top 5 authors with their rank, name, article count, and average pageviews per article (rounded to the nearest integer). Handle ties in average pageviews by giving priority to authors with more published articles, and if still tied, order alphabetically by author name.
Example 1
Example 2
- ›Return columns: rank, name, article_count, avg_pageviews
- ›Only include authors with at least 3 articles published after 2024-06-01
- ›Average pageviews should be rounded to nearest integer
- ›Break ties by article count (more articles rank higher), then alphabetically by name
- ›Return only top 5 authors
Reference solution available after you attempt the question.
Ready to solve it?
Start a session on Mockbit #60. Write your SQL, run it against real data, and get graded on correctness, efficiency, query structure, and business understanding.
- #46A streaming platform wants to identify content that's experiencing 'viewership...medium
- #55AdMetrics Agency manages digital advertising campaigns across multiple channelsmedium
- #56TelecomCorp wants to analyze call quality degradation patterns across their cell...medium
- #41You're analyzing user engagement for a social media platformeasy
- #42A video streaming platform tracks user viewing sessionshard