7 kyu

Best-Selling Books (SQL for Beginners #5)

24,383 of 24,386MaikelNabil

Description:

You work at a book store. It's the end of the month, and you need to find out the 5 bestselling books at your store. Use a select statement to list names, authors, and number of copies sold of the 5 books which were sold most.

books table schema

  • name
  • author
  • copies_sold

NOTE: Your solution should use pure SQL. Ruby is used within the test cases just to validate your answer.


SQL for Beginners Series

This kata is part of a collection of SQL challenges for beginners. You can take the rest of the challenges here:

  1. Adults only (SQL for Beginners #1)
  2. On the Canadian Border (SQL for Beginners #2)
  3. Register for the Party (SQL for Beginners #3)
  4. Collect Tuition (SQL for Beginners #4)
  5. Best-Selling Books (SQL for Beginners #5)
  6. Countries Capitals for Trivia Night (SQL for Beginners #6)
Fundamentals
SQL
Databases

Stats:

CreatedMay 9, 2017
PublishedMay 9, 2017
Warriors Trained28574
Total Skips1138
Total Code Submissions54449
Total Times Completed24386
SQL Completions24383
Total Stars88
% of votes with a positive feedback rating93% of 2364
Total "Very Satisfied" Votes2052
Total "Somewhat Satisfied" Votes278
Total "Not Satisfied" Votes34
Total Rank Assessments36
Average Assessed Rank
7 kyu
Highest Assessed Rank
2 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • MaikelNabil Avatar
  • smile67 Avatar
Ad