I have a table of customers, and a table of products. I also have a table of orders. Each time a customer orders a product the details of the customer and the order are added to the orders table. Pretty standard.
I have a query that shows customers who bought product 1 and 2, but none of the other products I have on sale, or that other customers have bought (just those who have bought product 1 and 2).
But, with the way I have the tables set up, each order for both of these products shows up in the query, which means if CustomerA bought product 1 five times then the customer shows up the query five times..
I want to run a promotion, where any customer who has bough both product 1 and 2 gets mailed a coupon, so I need the query to list the customers who bought both of these items (but list them only once!) so that I can mail merge a coupon and post it to them..
So far I have tried in the criteria for products in the query I have set up.. 1 Or 2.. but this displays customers who have bought either of the products but not both.. and I have tried 1 And 2, but this returns nothing.
Any thoughts? Hope this makes sense..
Thanks in advance
I have a query that shows customers who bought product 1 and 2, but none of the other products I have on sale, or that other customers have bought (just those who have bought product 1 and 2).
But, with the way I have the tables set up, each order for both of these products shows up in the query, which means if CustomerA bought product 1 five times then the customer shows up the query five times..
I want to run a promotion, where any customer who has bough both product 1 and 2 gets mailed a coupon, so I need the query to list the customers who bought both of these items (but list them only once!) so that I can mail merge a coupon and post it to them..
So far I have tried in the criteria for products in the query I have set up.. 1 Or 2.. but this displays customers who have bought either of the products but not both.. and I have tried 1 And 2, but this returns nothing.
Any thoughts? Hope this makes sense..
Thanks in advance