EY interview question

SQL TEST by a robot with nested (too many of them) SQL queries