Expand a one-to-many merge and keep childless parents (agency)
List every task with its project's owner, and keep projects that have no tasks yet as a single row.
- Level
- intermediate
- Time
- ~8 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Predict and produce the row multiplication of a one-to-many left outer merge.
The scenario, sample data, step list, hints and solution open with Pro. Grading checks your query against hidden data as well as the visible sample, so a query that only fits the sample doesn't pass.
Input
- Projects (table)
- Project: text
- Owner: text
- Tasks (table)
- TaskID: text
- Project: text
- Hours: number
Expected output columns
Project (text), Owner (text), TaskID (text (some rows null)), Hours (number (some rows null))