TSQL help, report o...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] TSQL help, report on reactivated customers

2 Posts
2 Users
0 Reactions
74 Views
 mrmo
Posts: 10714
Free Member
Topic starter
 

Having a little difficulty getting my head round this,

I have a two part problem, which i need to present in SSRS using charts,

first, new customer accounts by month, this is simply a count of customers against min orderdate.

The second, is reactivated accounts, a reactivated account is one that has not bought for 4 months. So what i need to plot is the number of reactivate accounts by month. Suggestions please. any help gratefully received.


 
Posted : 24/07/2012 3:54 pm
Posts: 3298
Full Member
 

first: yes that's right

second: join orders against itself on customer and the previous date where the date diff > 4 months


 
Posted : 24/07/2012 4:15 pm
 mrmo
Posts: 10714
Free Member
Topic starter
 

Thanks, i can see that partially,

But not to sure on how to link on dates?

inner join customer to customer and date to date-4months,

simplified my table is

account_id, order_reference, order_status, order_date.


 
Posted : 24/07/2012 8:16 pm