Thursday, March 09, 2006

Scaled Ranking

In my earlier post I was inquiring about a way to do scaled ranking using MySQL. The answer was quite simple as it turned out.

I simply modified one of the queries on Arjen's quiz entry.

The end solution is:

SELECT (SELECT count(*) FROM users WHERE score >
((1 - (SELECT score FROM user WHERE user='mysql'))/(SELECT count(*) FROM user) ) * 10 )
AS ranking

1 comment:

LinDol said...

thank you,
good your idea. :D

sorry, 4 my english.