Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Scenario:
Tbl1:
KEY, VALUE1, DATE1
Tbl2:
KEY, VALUE2, DATE2, today()
Note: VALUE1 is a subset of VALUE2, and hence DATE1 is a subset of DATE2.
Need the count(VALUE2) Where DATE2 is in between DATE1 and today().
Thanks in advance.
I don't know if you need to use interval match here. Why don't you just join TBL1 onto TBL2 using key then you can just write an if statement.
TBL2:
LOAD
KEY,
Value2,
Date2
FROM Data
Left Join
LOAD
KEY,
Date1
FROM Data
TBL3:
LOAD
*,
If(Date2 >= Date1 and Date2 <= Today(), 1, 0) as RecordCount
Resident TBL2