Skip to content
ExamSpine

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_idtitleauthoryear_published
1Coral ReefsMbeki2019
2Dark Matter BasicsRuiz2012
3Algorithms for KidsTanaka2021
4Bridges of LisbonCosta2016
5Eclipse DiariesOkafor2015

Loan

loan_idbook_idstudent_namedue_datereturned
13Ana2026-11-02FALSE
21Ben2026-10-20TRUE
32Chloe2026-10-28FALSE
43Dev2026-10-15TRUE

(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]