Deloitte interview question

Some sql queries on grouping functions were asked