MySQL Forums
Forum List  »  Newbie

who do you devide the results from a limit 2 query?
Posted by: Chris Collins
Date: June 08, 2005 10:50PM

I am sorry for the stupid question but I really need to get this working tonight!

Query
select value from src_table where var_ref = 3899 or var_ref = 3898 order by timestamp DESC limit 2;

result

+---------+
| value |
+---------+
| 2214936 |
| 1563174 |
+---------+

I need to devide these two numbers. Ideally the first var_ref (3899) by the next var_ref.

Pulling my hair out.

Options: ReplyQuote


Subject
Written By
Posted
who do you devide the results from a limit 2 query?
June 08, 2005 10:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.