Link to home
Start Free TrialLog in
Avatar of Rickzzz
Rickzzz

asked on

SQL Recursive Select

I have a table with with 3 columns I need to key on to build triangle data.

EffectiveMonth = 01/2017, 02/2017, 03/2017... to current month
TransactionEffectiveMonth = 01/2017, 02/2017, 03/2017... to current month
TotalPremium = 20.00

I need to sum each effective month as of each transaction effective month.

So, I need the sum of TotalPremium for each EffectiveMonth, as of each TransactionEffectiveMonth so that the data returned is represented as shown in the attached image.

EffectiveMonth only needs to be evaluted as of 2 years out. Hopefully the attached image defines that for you as well.

Thanks in advance!!
User generated image
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rickzzz
Rickzzz

ASKER

Man did I overthink that... thanks!
Good to know and happy coding. Thanks