Hi i am working on aging bucket in database with two table, where TotalBal is <> 0 and need to sum the TotalBal based on:
1. CBO from Client table (joined from client code to PK_Client)
2. 30 day bucket grouping based on number of days from SetupDate (on Debtor) and current date. So it depends on where that Setup Date falls in relation to today. For example if Setup Date is 3/1/17 it would fall in the ‘0-30’ bucket. If the Setup date is 2/1/17 it would fall in the ’31-60’ bucket. There would be 7 buckets altogether as 0-30, 31-60, 61-90, 91-120, 121-150, 151-180, Over 180. I need the output as below, can anybody help me with the solution
Aging bucket
CBO 0-30 31-60 61-90 etc……up to Over 180 days
CBO1
CBO2
CBO3
etc
Open in new window