MySQL Forums
Forum List  »  Performance

Re: mysql subquery too slow
Posted by: Felix Geerinckx
Date: October 29, 2005 09:30AM

S C wrote:

> I'm trying to report all trades that have skipped the MODIFIED state, they just jump from NEW to
> PROCESSED

Not sure if I understand your requirements completely. Does this do what you want?

SELECT s1.*
FROM stack s1
LEFT JOIN stack s2 ON s2.trade_num = s1.trade_num AND s2.status = 'MODIFIED'
WHERE
s1.date_appeared = CURRENT_DATE AND
s1.status = 'PROCESSED' AND
s2.status IS NULL;

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Views
Written By
Posted
1561
S C
October 28, 2005 03:02PM
Re: mysql subquery too slow
1213
October 29, 2005 09:30AM
1237
S C
October 31, 2005 11:32AM


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.