Use EXISTS for semi-join behavior
Return customers who have at least one order without duplicating customer rows.
SELECT c.customer_id, c.name
FROM customers c
WHERE EXISTS (
SELECT 1
FROM orders o
WHERE o.customer_id = c.customer_id
);`EXISTS` is often clearer and more efficient than joining and deduplicating.