Pergunta de entrevista da empresa Wayfair

Balanced brackets question, Different joins in SQL