Nagwa interview question

SQL query performance