Hi,
I'm trying to query some specific data on our customer database.
For some context our customers could have had sales contracts with multiple different sales reps over the years.
I want to find all the customer accounts of a particular sales rep, however I then want to exclude any accounts where this sales rep and any other sales rep has sold to the same customer.
This is where I'm unsure how to proceed, I can find everything that sales rep has sold (rep id 2) with the query below:
However I'm not sure how I would go about expanding that to exclude any accounts (ACNo) that also have contracts (ContractNo) from another sales rep (RepNo)
I'd be grateful for any advice on how to go about doing this.