HCLTech interview question

SQL queries based on scenarios