Synechron Interview Question

sql queries using group by and dense rank