Answer it
P1 a3 library select join
5 marksYou mark it yourself against the marking points
A school library database has these two tables. In Loan, book_id is a foreign key to Book, and returned is a BOOLEAN.
Book
| book_id | title | author | year_published |
|---|---|---|---|
| 1 | Coral Reefs | Mbeki | 2019 |
| 2 | Dark Matter Basics | Ruiz | 2012 |
| 3 | Algorithms for Kids | Tanaka | 2021 |
| 4 | Bridges of Lisbon | Costa | 2016 |
| 5 | Eclipse Diaries | Okafor | 2015 |
Loan
| loan_id | book_id | student_name | due_date | returned |
|---|---|---|---|---|
| 1 | 3 | Ana | 2026-11-02 | FALSE |
| 2 | 1 | Ben | 2026-10-20 | TRUE |
| 3 | 2 | Chloe | 2026-10-28 | FALSE |
| 4 | 3 | Dev | 2026-10-15 | TRUE |
(a) Construct an SQL query that lists the titles of all books published after 2015, in alphabetical order of title. [2]
(b) Construct an SQL query that lists the student_name and the title of the book for every loan that has not been returned. [3]
[5]