-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 8:35 AM
To: Fifield, Mike
Subject: Re: dividing 

Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

sql,query

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:

Here is what my table looks like:

stuff
Item            votes           score
Apple           2               12
Dog             4               28
Cat             3               18


What I need to do is divide score by votes and return the items according to
how high they rank. I have tried this.

select * from stuff order by score / votes DESC limit 10

This does not seem to work. I have also tried; 

select * from stuff order by exp(score / votes) DESC limit 10

with no success, any ideas on how to do this?

---------------------------------------------------------------------
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