Amazon·Software Engineer·Technical Phone Screen
- Given tables for customers, orders, order items, and items, write a SQL query that returns the count of distinct customers who purchased both a Kindle and an Alexa.
“I went straight for a join across all four tables and then tried to filter in the WHERE clause, which almost immediately broke things because you end up excluding rows you need for the other item.”