Limit 4

SQL Basics: Top 10 customers by total payments amount

Overview For this kata we will be using the DVD Rental database. You are working for a company that wants to reward its top 10 customers with a free gift. You have been asked to generate a simple report that returns the top 10 customers by total amount spent ordered from highest to lowest. Total number of payments has also been requested. The query should output the following columns: customer_i..

Countries Capitals for Trivia Night (SQL for Beginners #6)

Your friends told you that if you keep coding on your computer, you are going to hurt your eyes. They suggested that you go with them to trivia night at the local club. Once you arrive at the club, you realize the true motive behind your friends' invitation. They know that you are a computer nerd, and they want you to query the countries table and get the answers to the trivia questions. Schema ..

Best-Selling Books (SQL for Beginners #5)

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 Solution: SELECT * FROM books ORDER BY copies_sold DESC LIMIT 5 Result: name author copies_sold The Unbearable Lightness of Bein..