SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Camera Buyers Without Memory Cards

Unsolved

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.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Amazon🏢 Walmart🏢 Best Buy

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM purchase_items
Full source dataset
11 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine