SELECT s1.initials, (
SELECT COUNT(*)
FROM scores AS s2
WHERE s2.score > s1.score
)+1 AS rank
FROM scores AS s1
More Related Contents:
- How to update multiple MySQL table entries with different id?
- Can’t insert data into mysql database using PHP [closed]
- which is better every user have a table or just a row [closed]
- Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) in
- How can I use PDO to fetch a results array in PHP?
- Fixing broken UTF-8 encoding
- MySQL check if a table exists without throwing an exception
- Export MySQL data to Excel in PHP
- Alternative to mysql_real_escape_string without connecting to DB
- HTML – Change\Update page contents without refreshing\reloading the page
- Calculate age based on date of birth
- How to write a stored procedure using phpmyadmin and how to use it through php?
- Doing calculations in MySQL vs PHP
- Geo-Search (Distance) in PHP/MySQL (Performance)
- Call to a member function execute() on boolean in [duplicate]
- PHP mysql search multiple tables using a keyword
- SQLSTATE[HY000] [1045] Access denied for user ‘username’@’localhost’ using CakePHP
- How do I count unique visitors to my site?
- Best practice: Import mySQL file in PHP; split queries
- ini_set, set_time_limit, (max_execution_time) – not working
- unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING error [duplicate]
- Setting a connect timeout with PDO
- How to build a JSON array from mysql database
- How to display a date as iso 8601 format with PHP
- How to generate unique id in MySQL?
- Fatal error: Call to undefined method mysqli_stmt::fetch_array() [duplicate]
- adding 30 minutes to datetime php/mysql
- Remotely connecting to a MySQL database
- Create table with PHP and populate from MySQL
- MYSQL select a piece of a string and order by that piece