I’m trying to write a query which will exclude rows based on their common value in a particular column if a value in another column exists. Essentially:
SELECT Phone, Name, Age
FROM Customer
WHERE etc etc etc
What I would like to do is: If, for example, one customer’s information would be: 111-222-3333, Rick, 45, and for whatever reason 45 is the particular value for which if it exists, I’d like to exclude all subsequent rows which match that corresponding telephone number, how would I do this?
Thanks!
Sounds like a
WHERE NOT EXISTSmay work here,