A cross-promotion between the brands Acorn and Dune targets customers who already buy from both. A customer qualifies when they have at least one purchase of an Acorn product and at least one purchase of a Dune product. Write an SQL query that returns customer_id for every qualifying customer. Order the results by customer_id ascending.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.