I have the following table:
ID | JobID | Data | ResultType --------------------------------- 1 | 12345 | XXXX | 0 2 | 12345 | YYYY | 1 3 | 23456 | A
Something like
select * from jobs where jobId not in (select jobId from jobs where resultType = 1)