SELECT COUNT(rating) position FROM users WHERE id = $this->id ORDER BY rating DESC
, но это не то. Количество записей не известно. SELECT @n:=@n+1 AS nn, u.*
FROM users u JOIN (SELECT @n:=0)
ORDER BY u.rating DESC
LIMIT 10
SELECT * FROM users ORDER BY rating DESC LIMIT 5, 1