The orphan hunt loses the orphan
LEFT JOIN from staging to the parent, exclusion as a decision · level 2 of 6
Opening your saved work…
Sign in to save across devices → · Download your guest work before switching accounts.
The orphan hunt loses the orphan · LEFT JOIN from staging to the parent, exclusion as a decision · level 2 of 6
Test the parent's key
Fill in the column to test, so the query keeps only the staged rows that found no gear type.
Finish line: 1 row · columns serial, type_id · in the order the question gives
Data: Trail Gear: build rehearsal.
SELECT s.serial, s.type_id
FROM stg_items s
LEFT JOIN gear_types g ON g.id = CAST(s.type_id AS INTEGER)
WHERE IS NULL
ORDER BY s.rowid;
- Blank 1 of 1: the parent's key, with its alias
Query results
Check to see the result here.Check to see the result here.
Practice here is evidence for you and your instructor, never a grade. Grades live in Canvas.