Answer the question
In order to leave comments, you need to log in
How to find the position of a user in the database?
Good afternoon. Help to make correctly request SQL.
There is a table:
id | user | count
in User - specifies the user ID.
in Count - indicates the number of actions performed by him.
I want to get a complete table sorted by count (who performed the most actions), and at the same time find out what position a certain User is in.
To get the list, I make a request: SELECT * FROM `stat` ORDER BY `count` DESC
how can I find out the value for the user user = 25 for example?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question