Mockbit/#60
SQLmediumRanking~15m

The Literary Digest, a prominent publishing house, wants to identify their most...

Problem

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.

Examples

Example 1

Example 2

Constraints
  • 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

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.

Related SQL questions
← Back homemockbit.io/q/60
PrivacyTerms© 2026 Mockbit