Need help getting a SQL. I have below kind of table.
Need below result records based on the fact that they have "abc" and "def" in Field2
- just one occurrence of each value not more
- no other value apart from "abc" and "def".
Expected result
Records that should not be in result enter image description here
I have tried different experiments with
Select * from MYTABLE
WHERE FIELD1 in ('abc','def')
Group by Field1
Having Count(*) = 2
but am doing something fundamentally wrong here, as it gives me "Member4" also since it has two occurrences of "abc"