Products your friends bought that you haven't
A user has a list of friends and a list of purchases; each purchase has a product id, an amount and a purchase id, and a product catalog maps product ids to names. Return the names of products that the user's friends bought but the user never did. Discuss duplicates and the cost when users have many friends.
No answer yet. Write the first one; the best answer gets endorsed.
