Amazon wants to email a memory-card promotion to customers who bought at least one item in the `Camera` category but have never bought anything in the `Memory Card` category. Write an SQL query that returns `customer_id` and `camera_items` (the number of Camera items the customer bought) for these customers. 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.