You can create an auxiliary table, that holds the number of teams for each points amount:
CREATE TEMPORARY TABLE T SELECT Points, MIN( Rank ) AS SmallerRank FROM myTable GROUP BY Points You get: Points SmallerRank 10 1 9 2 7 4 Now you join this table to the original table on Points. You get SmallerRank instead of Rank. HTH Ignatius ____________________________________________ ----- Original Message ----- From: "Rico Derks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 10:53 AM Subject: [PHP-WIN] create ranking > Hi, > > I'am trying to create a ranking from a mysql database. My problem is that I > don't know how to determine exaequo ranking!! Exaequo means that two teams > with the same amount of points get the same rank. > > Wrong: > Rank Team Points > 1 Team1 10 > 2 Team2 9 > 3 Team3 9 > 4 Team4 7 > > Correct: > Rank Team Points > 1 Team1 10 > 2 Team2 9 > 2 Team3 9 > 4 Team4 7 > > Can anyone help me with this problem. > > Cheers, RICO. > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php