← Inventory & Replenishment Exceptions My saved work →
Independent practice · SQLite
List unmatched inbound product keys
Practice dataset
Your work
Active 0:00 · Paused 0sKeep a handoff you can replay
Check your current answer, then download the output and its report. The report includes the source, answer and each check so you can review what passed and what needs work.
To replay your work, open this task with the same dataset, import your answer and check it again.
Show the reference answer
WITH clean_inbound AS (SELECT DISTINCT p.* FROM inbound p WHERE NOT EXISTS (SELECT 1 FROM inbound x WHERE x.po_id=p.po_id AND (x.sku<>p.sku OR x.units<>p.units OR x.eta<>p.eta OR x.status<>p.status))) SELECT DISTINCT p.sku FROM clean_inbound p LEFT JOIN stock s ON s.sku=p.sku WHERE s.sku IS NULL ORDER BY p.sku
Do not create a stock row from an unmatched receipt or lose it in an inner join.