HCLTech interview question

sql server queries