How to rank a column in a grouping sets data?

General

How to rank a column in a grouping sets data?

I have a table which I have created using group by grouping sets. It is done on 7 columns and at various levels.

Now at each level, i need to rank the lower hierarchical level using rank over function.

Can anyone help me with the syntax of the code?

Tags (2)