Hi, I have a table as the main search using dbxquery below: | dbxquery connection=my_connection query="SELECT id, start_date, end_date FROM my_table" Sample records: id, start_date, end_date ...
See more...
Hi, I have a table as the main search using dbxquery below: | dbxquery connection=my_connection query="SELECT id, start_date, end_date FROM my_table" Sample records: id, start_date, end_date 1, 2020-01-01, 2020-01-04 2, 2020-01-03, 2020-01-05 ......
And I have another lookup csv with only two columns below: date, amount 2020-01-01, 10 2020-01-02, 20 2020-01-03, 10 2020-01-04, 10 2020-01-05, 20 ...... The output I want is: id, start_date, end_date, total 1, 2020-01-01, 2020-01-04, 50 # total sum of 2020-01-01 to 2020-01-04 (10+20+10+10) 2, 2020-01-03, 2020-01-05, 40 # total sum of 2020-01-03 to 2020-01-05 (10+10+20) What could be the best way to get this done? Thanks in advance!