Pregunta de entrevista de Wayfair

Balanced brackets question, Different joins in SQL