Synechron interview question

sql queries using group by and dense rank