Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have create load script like below:
Date:
LOAD
Min(CREATED_DATE) as FirstDay,
Max(CREATED_DATE) as Today,
Max(CREATED_DATE)-30 as Last30,
Max(CREATED_DATE)-60 as Last60,
Max(CREATED_DATE)-90 as Last90,
Max(CREATED_DATE)-120 as Last120
RESIDENT Sales;
LET v_FirstDay = Date(peek('FirstDay',0,'Date'),'YYYY-MM-DD');
LET v_today = Date(peek('Today',0,'Date'),'YYYY-MM-DD');
LET v_Last30 = Date(peek('Last30',0,'Date'),'YYYY-MM-DD');
LET v_Last60 = Date(peek('Last60',0,'Date'),'YYYY-MM-DD');
LET v_Last90 = Date(peek('Last90',0,'Date'),'YYYY-MM-DD');
LET v_Last120 = Date(peek('Last120',0,'Date'),'YYYY-MM-DD');
DROP TABLE Date;
Between Date doesn't works anymore:
Cohort:
LOAD
CREATED_DATE as CREATED_DATE1,
CUSTOMER_EMAIL as Email,
ITEM_STATUS as ITEM_STATUSS,
ORDER_STATUS as ORDER_STATUSs
RESIDENT Sales
Where CREATED_DATE >= Date#('$(v_Last30h)', 'YYYY-MM-DD') and CREATED_DATE <= Date#('$(v_today)', 'YYYY-MM-DD');
could you please advise me ?
Best,
Robert
You used v_Last30h in where, but your Let has different variable name
LET v_Last30 = Date(peek('Last30',0,'Date'),'YYYY-MM-DD');
You used v_Last30h in where, but your Let has different variable name
LET v_Last30 = Date(peek('Last30',0,'Date'),'YYYY-MM-DD');
oops ... Thanks anbu.