Problems / Anti Join Pattern / Editorial
products
order_items
product_id
WHERE oi.item_id IS NULL
The anti-join pattern (LEFT JOIN + IS NULL) is equivalent to NOT IN or NOT EXISTS. In PySpark, left_anti is a dedicated join type that does this in one step. Products 6 (Webcam), 8 (Charger), 9 (Speaker), and 10 (Stylus) have no orders.
NOT IN
NOT EXISTS
left_anti
Solve Anti Join Pattern yourself →