I need to calculate the rank in mysql. Suppose I have list of sum of my product sales values of entire month then i need to rank the product from highest sales value in order to rank like 1 ,2 ,3 etc
Month Product Sum of Sales
Jan Latop 450000
jan Latop 150000
Jan Latop 250000
Feb Desktop 200000
Feb Desktop 150000
Feb Desktop 180000
so from above data output will be like
Month Product Sum of Sales rank
Jan Latop 450000 1
Jan Latop 250000 2
jan Latop 150000 3
Feb Desktop 200000 1
Feb Desktop 180000 2
Feb Desktop 150000 3