Piramal Finance interview question

SQL querries based question on how to write query with SQL groupby