Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

8. Library Book Checkouts by Date (Easy)
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Problem Statement

Table: Checkouts
This table logs each book checkout from a library, including the date of the checkout and the title of the book.

+----------------+-----------+
| Column Name    | Type      |
+----------------+-----------+
| checkout_date  | date      |
| book_title     | varchar   |
+----------------+-----------+
There is no primary key for this table, and it may contain duplicate rows.

Develop a solution to report the number of distinct book titles checked out and a lexicographically sorted list of these titles for each date.

Example

Input:

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible