Puoi spostare il WHERE
clausola fuori classifica risultati di calcolo.
Esempio :
SELECT * FROM (
SELECT
`item`, (`totalrate` / `nrrates`) AS `rank`,
@curRank := @curRank + 1 AS `ranking`
FROM `rtgitems`, (SELECT @curRank := 0) r
ORDER BY (`totalrate` / `nrrates`) DESC
LIMIT 10
) results
WHERE item REGEXP 'kelly'