Skip to content
Exercise · How to Choose a Database · lesson 13 of 18

Exercise: cappuccino and croissant

The coffee shop is preparing a "cappuccino and croissant" combo and wants to send it to those who have already bought both items. Write an aggregation pipeline on the orders collection that finds the customers who bought both a cappuccino (item_id: 3) and a croissant (item_id: 10).