#007Level 1 of 5 · Scenario 2: The Loans Register
Two names on the list
Scenario 2 · The Loans Register
The loans committee meets Thursday and has flagged two institutions it wants to talk about — Brannigan and Pentland. Nobody has said why yet. Pull what we have lent them.
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.
- IN
- Match any value from a list, without repeating OR.
Objective
Return the object title and borrower for every loan to Brannigan Institute or Pentland Collection, in alphabetical order by title.
Your query
⌘ ⏎
Results
No result yet.