MySQL Forums
Forum List  »  Newbie

Problem constructing query
Posted by: toma saletii
Date: June 21, 2017 01:26AM

Hello. Can someone help me to create query? I have table:
id(int,PK),internal_nr(int),step(int),date(datetime),status(var)
And a sample records:
1,200100,1,2017-06-20 12:00:00,S
2,200100,1,2017-06-20 13:00:00,E
3,200200,1,2017-06-20 14:00:00,S

Is it possible to display only records with status S, but only if there is no E status e.g:
Only to display:

3,200200,1,2017-06-20 14:00:00,S

Is this possible at all from SQL?

Options: ReplyQuote


Subject
Written By
Posted
Problem constructing query
June 21, 2017 01:26AM


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.