#011Level 5 of 5 · Scenario 2: The Loans Register
The paperwork audit
Scenario 2 · The Loans Register
Every outgoing loan is supposed to have a courier recorded against it. Most of the gaps in the register are one-offs — a form nobody finished on a Friday. The auditor is after something different: one institution whose file has no courier on a single loan it has ever taken. That is not forgetfulness, it is a process that was never followed.
Schema · 2 tables
borrowers
- idpkINTEGER
- nameVARCHAR
- cityVARCHAR
loans
- idpkINTEGER
- object_titleVARCHAR
- borrowerVARCHAR
- sent_onDATE
- due_onDATE
- returned_onDATE
- courierVARCHAR
- condition_backVARCHAR
Toolkit
- SELECT
- Choose which columns come back.
- FROM
- Specify which table to read.
- WHERE
- Filter rows by a condition.
- ORDER BY
- Sort the results by a column.
- DESC
- Reverse the sort: largest or latest first.
- IS NULL
- Test whether a value is missing.
- IN
- Match any value from a list.
- DISTINCT
- Collapse duplicate rows to one each.
Objective
Name the institution with no courier recorded on any of its loans. Run as many queries as you need.
Your query
⌘ ⏎
The institution
Results
No result yet.