A bookstore's catalog team wants to feature its most prolific authors. A book counts as published only when published_date is set; books with a NULL published_date are drafts that have not been released yet. Write an SQL query that returns author_id, author_name and book_count (the number of published books) for every author with at least 5 published books. Order the results by book_count descending, then author_id ascending.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.