Page 1 of 1

Subscription start date

Posted: Wed Mar 02, 2016 5:00 am
by egormsen
Anyone have any ideas on the best way to figure out how long a customer has been a subscriber of one our subscription plans? We would like to reachout to people who have been subscribers certain amount of time (ie 6 months, 12 months) with special offers.

Thanks,

Re: Subscription start date

Posted: Wed Mar 02, 2016 5:56 am
by mazhar
How about using Order Date of subscription?

Re: Subscription start date

Posted: Wed Mar 02, 2016 6:57 am
by egormsen
I must be looking in the wrong place - I don't see an order date in the subscription table. In that table there are dates for Expiration, NextOrder, LastOrder, ExpirationAlert

Where do I find that original order date?

Re: Subscription start date

Posted: Wed Mar 09, 2016 1:02 am
by mazhar
For this you will have to use a JOIN query. Subscription is created against an order item which belong to an order. Following query will get you all subscriptions with related order date

Code: Select all

SELECT S.SubscriptionId, O.OrderDate FROM ac_Subscriptions AS S 
INNER JOIN ac_OrderItems AS OI ON S.OrderItemId = OI.OrderItemId
INNER JOIN ac_Orders AS O ON OI.OrderId = O.OrderId

Re: Subscription start date

Posted: Wed Mar 09, 2016 4:32 am
by egormsen
Thank you!