How to add rank based on points in mysql -


I can use some help with this query.

Here is my table:

  ID name point 1 Yogi 5 2 cm 10 3 white 5 4 black 8  

my query The result is:

  Select point DESC  

The result is:

  id's name point 2 sasi 10 4 black 8 1 Yogi 5 3 white 5  

But I would like the result as below please guide me.

  id's name point rank 2 sasi 10 1 4 black 8 2 1 yogi 5 3 3 white 5 4  

is it possible

SET @rank = 0; Select
 , such as the order DESC  

as a line query, @ rank: = @ rank + 1 rank , @ Rank: Rank from + 1R rank, (SELECT @Rank: = 0) point DESC


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -