eQ Technologic interview question

Nested query