For a table with fields A and B:
| A | B |
---------
| 1 | p |
| 1 | f |
| 1 | t |
| 2 | p |
| 2 | f |
I'm trying to build a query, find all A, which also does not have 't' for B.
So, for this data, the output should be
| A |
-----
| 2 |
since 2 does not have the 't' specified anywhere in field B
I tried to do SELECT DISTINCT A FROM table WHERE B!='t', but this logic is wrong, since 1 also contains a line with B!='t'. I also tried various options GROUP BY, but I was stuck.
Please, help
source
share