Nagwa Interview Question

SQL query performance