Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this query from an old app that I didn't build. I'm converting it from QV to QS.
RA_CUSTOMER_TRX_ALL:
SQL
SELECT
DISTINCT
AR1.SOLD_TO_CUSTOMER_ID
,AR1.SHIP_DATE_ACTUAL
FROM
AR.RA_CUSTOMER_TRX_ALL AR1
WHERE
AR1.SHIP_DATE_ACTUAL IS NOT NULL
AND NOT EXISTS (
SELECT
DISTINCT
AR2.SOLD_TO_CUSTOMER_ID
,AR2.SHIP_DATE_ACTUAL
FROM
AR.RA_CUSTOMER_TRX_ALL AR2
WHERE
AR1.SOLD_TO_CUSTOMER_ID = AR2.SOLD_TO_CUSTOMER_ID
AND AR2.SHIP_DATE_ACTUAL < AR1.SHIP_DATE_ACTUAL
AND AR2.SHIP_DATE_ACTUAL >= TRUNC(ADD_MONTHS(AR1.SHIP_DATE_ACTUAL, - 35), 'MM')
);
Running this query as-is is brutally slow. I think it will run faster if I convert it to a normal Qlik Load.
I have loaded 2 copies of the table RA_CUSTOMER_TRX_ALL (RA_CUSTOMER_TRX_ALL, RA_CUSTOMER_TRX_ALL2) into memory and want to replace this SQL query with normal Qlik Sense syntax.
I am completely stuck.