Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

select customers that have orders matching a specific list of products or more.

$
0
0

anyone know how I can select a list of customers that have orders with at least a specific list of products or more, but not with a partial list?

e.g. 

Product Search List (is a table):
1 Oranges
2 Apples

I want this to return:
1 Joe Smith (has an Order with Oranges, Apples,Grapes)
2 Jane Doe (has an order with Oranges, Apples)

Don't return
3 Jack Ripper (has an Order with Oranges)


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>