Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
12. Library Book Checkouts First Year (Medium)
On this page

Problem Statement

Table: Checkouts

This table records the checkouts of books in a library. Each record includes a checkout ID, book ID, the year the book was checked out, the number of times it was checked out that year, and the price per checkout.

+----------------+-------+
| Column Name    | Type  |
+----------------+-------+
| checkout_id    | int   |
| book_id        | int   |
| year           | int   |
| checkouts      | int   |
| price          | int   |
+----------------+-------+
(checkout_id, year) is the primary key of this table.

.....

.....

.....

Like the course? Get enrolled and start learning!

On this page