This should be a typical SQL question:
Suppose I have a Product table with two columns: accountNum and name:
Of course, the real table has much more data.
Now I want to get a list of accountNum where there is no name of Apple in the WHOLE table for this accountNum, I used below query:
select distinct accountNum from Product
where name not in
What I wanted to get is accountNum: 4. But sometimes, I just got other accountNum, like 3, etc. It's obviously not working. Any explanation? Thanks.