MySQL Forums
Forum List  »  Newbie

Re: Problem constructing query
Posted by: Peter Brawley
Date: June 21, 2017 08:08AM

One way---an exclusion join with a condition added for status='s' ...

select a.id, a.internal_nr, a.step, a.date
from tbl a
left join tbl b on a.internal_nr=b.internal_nr and b.status='e'
where a.status='s' and b.id is null;

Options: ReplyQuote


Subject
Written By
Posted
Re: Problem constructing query
June 21, 2017 08:08AM


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.