Skip to content
Aabha AI Academy
Skip to reading

SQL

08A

Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.

-- 08a: Find customers with a refund
SELECT c.customer_id,c.customer_name FROM aabha_sql.customers AS c
WHERE EXISTS (SELECT 1 FROM aabha_sql.orders AS o JOIN aabha_sql.refunds AS r ON r.order_id=o.order_id
 WHERE o.customer_id=c.customer_id) ORDER BY c.customer_id;

Download this source file