There are two tables C and B.
They're connected by C.id=B.cid
.
I need to find all the C.id
es where:
- None of the rows corresponding to
cid
hasis_true='Y'
I've tried various queries but can't wrap my head around any of them. This is one of my ideas.
select * from
C inner join B
on C.id=B.cid
where
-- loop all rows of B using B.cid
-- output if the row has is_true!='Y'