EY interview question

SQL question related to 'having' clause.