I want to create a table with the (creating a unique code that identifies the customer&month)customers that buys a freepass. I created a table from the initial order that "starts" the freepass period (90 days)
This is the table:
created_at
Custaccount
Quarterly_DPASS
SalesBOid
QUARTELY_DPASS_ID
02/01/2017
C000039
21134283
PV00405616
C000039-2017-1
02/01/2017
C002711
21134283
PV00405617
C002711-2017-1
02/01/2017
C052805
21134283
PV00405618
C052805-2017-1
02/01/2017
C063701
21134283
PV00405621
C063701-2017-1
ant the result has to 3 lines per each line. Each one for present created_at code, +30 days created_at, +60days created_at