I could use some assistance with this query.
Here’s my table:
id name point
1 yogi 5
2 sasi 10
3 white 5
4 black 8
My query is:
SELECT * FROM points ORDER BY point DESC
The result is:
id name point
2 sasi 10
4 black 8
1 yogi 5
3 white 5
But I’d like results like below. Please guide me.
id name point rank
2 sasi 10 1
4 black 8 2
1 yogi 5 3
3 white 5 4
Is this possible to do?
thanks in advance.
try this
as a single line query like following