Capgemini interview question

SQL queries