07A
Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.
Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.
-- 07a: Expose payment inflation
SELECT i.order_id,COUNT(*) AS joined_rows,SUM(p.amount) AS inflated_payments
FROM aabha_sql.order_items AS i JOIN aabha_sql.payments AS p ON p.order_id=i.order_id
WHERE i.order_id=1006 AND p.status='succeeded' GROUP BY i.order_id;