Add extra conditions to the join itself.
Section: Join Conditions and Filters
Join with additional predicate
sql
sql
SELECT o.order_id, s.status
FROM orders o
JOIN shipments s
ON s.order_id = o.order_id
AND s.status = 'delivered';Explanation
Predicates in the ON clause affect join matching behavior.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Join Conditions and Filters