Sobes.tech
Middle+

Write an SQL query to get the top 10 most popular books.

sobes.tech AI

Answer from AI

sql SELECT book_title, COUNT(*) AS popularity FROM sales GROUP BY book_title ORDER BY popularity DESC LIMIT 10;


This query assumes you have a `sales` table with a `book_title` column, where each record represents a book sale. The query groups data by book title, counts the number of sales, and displays the top 10 most popular books.
Write an SQL query to get the top 10 most popular… - sobes.tech