Learn with Abdou

Chapter 10 · Concept 3 of 5 · Practice

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

Level 2: Fill the blank · Exercise 1 of 1

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.

Fill the blankOpening the database…
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;
  1. Blank 1 of 1: the parent's key, with its alias
Open in the playground

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.