EY interview question

joins subquery, having and where difference