Problems / Semi Join Exists / Editorial
WHERE EXISTS (SELECT 1 FROM shipments WHERE shipments.supplier_id = suppliers.supplier_id)
A semi-join returns rows from the left table that have at least one match in the right table, without duplicating the left row. EXISTS in SQL and left_semi in PySpark both implement this. Suppliers 3 (Circuit Co), 5 (Echo Parts), and 7 (Globe Trade) have no shipments.
EXISTS
left_semi
Solve Semi Join Exists yourself →