Genpact interview question

SQL queries in moderate level