Hi there,

I would like to find out the top 10 of some ratings. There are 2 columns.
One for the rating and one for the amount of ratings.
To find out the top 10 I would have to divide those 2 values and sort it.

Somehow this does not work. I do not have a clue why. Maybe someone of you
guys do see the error:

SELECT
  ID,
  rating_total / ratings_amount AS top10
FROM rating
ORDER BY top10 desc
LIMIT 10

Thanx for any help,

Andy
query


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to