cbVision
08-26-2009, 01:53 PM
Hey guys,
I'm not sure how exactly to describe this, but i'll do my best.
I want to pull a list of customers who are tied to one subscription, lets call it SUBSCRIPTION X, but not tied to SUBSCRIPTION Y.
One customer can have many subscriptions. Let's setup a fake database, like this:
customers:
1 John
2 Ted
3 Bill
subscriptions:
1 SUBSCRIPTION X
2 SUBSCRIPTION Y
customer/subscription:
1 1
1 2
2 1
3 1
From this, you can see that John has both subscriptions, and Ted and Bill only have a subscription to X. I'm looking for the query to pull only Bill and Ted.
How the heck does that work?! I think I've just over-thought this thing.
Thanks in advance.
I'm not sure how exactly to describe this, but i'll do my best.
I want to pull a list of customers who are tied to one subscription, lets call it SUBSCRIPTION X, but not tied to SUBSCRIPTION Y.
One customer can have many subscriptions. Let's setup a fake database, like this:
customers:
1 John
2 Ted
3 Bill
subscriptions:
1 SUBSCRIPTION X
2 SUBSCRIPTION Y
customer/subscription:
1 1
1 2
2 1
3 1
From this, you can see that John has both subscriptions, and Ted and Bill only have a subscription to X. I'm looking for the query to pull only Bill and Ted.
How the heck does that work?! I think I've just over-thought this thing.
Thanks in advance.