Hi Gaurav, order by would be generally used for some sorting, by default, attributes are sorted in alphabetical order, and you can sort the tables, you can also check our documentation for rank functions but we are confused by your question - what value are you trying to get? let us know, maybe add some screenshot or drawing of the expected result