Wayfair Interview Question

Balanced brackets question, Different joins in SQL