Grokking SQL for Tech Interviews
Ask Author
Back to course home

0% completed

12. Library Book Checkouts First Year (Medium)
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 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!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible