Reputation: 629
I have a table named TRANSACTION, that has the following columns:
ITEM
STORE
REASON
QUANTITY
I need to calculate a metric, "30_DAYS_SALES_QUANTITY" as per the following calculation:-
30_DAYS_SALES_QUANTITY = (Aggregated SUM of QUANTITY by ITEM, STORE when REASON = 183) - (Aggregated SUM of QUANTITY by ITEM, STORE when REASON = 182) BETWEEN SYSDATE - 30 and SYSDATE.
Upvotes: 1
Views: 52