here is my table:
Company Address Deleted
AAA USA NO
AAA USA Yes
BBB Canada NO
I would like to select only those companies that have YES in "deleted" field (if they are duplicated as in AAA case). But if there is only one record for the comapny (as in BBB), I also wanna select it, even though "deleted" = "NO".
So the result of the query will give me this:
AAA USA Yes
BBB Canada NO
Can anyone please help me. I'm a little confused.
Thanx.
Company Address Deleted
AAA USA NO
AAA USA Yes
BBB Canada NO
I would like to select only those companies that have YES in "deleted" field (if they are duplicated as in AAA case). But if there is only one record for the comapny (as in BBB), I also wanna select it, even though "deleted" = "NO".
So the result of the query will give me this:
AAA USA Yes
BBB Canada NO
Can anyone please help me. I'm a little confused.
Thanx.