I have a table which includes the columns 'buyer', 'seller' and 'buyer_spend'. Each purchase is shown as a separate row with the buyer name, the seller name and the amount that's been bought.
Is it possible to use a single query to show all the distinct buyers that have not purchased from a seller?
For example if I have 'Seller A', I want to find all of the distinct Buyers that have not purchased from Seller A. I'm having trouble because the following query return all transactions that were not for Seller A, which includes many Buyers that have indeed purchased from Seller A on another row.
SELECT DISTINCT buyer WHERE seller!='Seller A';
This is probably quite straightforward, but I'm struggling to get my head round it.
Many thanks in advance.