SELECT s22.wk_dt
FROM attr_table s21
CROSS JOIN TIME s22
CROSS JOIN
(SELECT day_of_week FROM sys_calendar.CALENDAR WHERE calendar_date = CURRENT_DATE) AS a
WHERE (s21.DC_LOC_ID,s22.wk_dt) IN (SEL A.DC, B.wk_dt FROM fact B
JOIN (SELECT DC_LOC_ID DC, MAX(INV_DT) inv_DT FROM INV_SCH GROUP BY DC_LOC_ID WHERE pinv_dt < CURRENT_DATE-day_of_week +1) A
ON B.DC_LOC_ID=A.DC
GROUP BY s22.FSCL_WK_END_DT.
try,
SELECT s22.wk_dt
FROM attr_table s21
CROSS JOIN TIME s22
CROSS JOIN
(SELECT day_of_week FROM sys_calendar.CALENDAR WHERE calendar_date = CURRENT_DATE) AS a
WHERE (s21.DC_LOC_ID,s22.wk_dt) IN (SEL A.DC, B.wk_dt FROM fact B
JOIN (SELECT DC_LOC_ID DC, MAX(INV_DT) inv_DT FROM INV_SCH GROUP BY DC_LOC_ID WHERE pinv_dt < CURRENT_DATE-day_of_week +1) A
ON B.DC_LOC_ID=A.DC
GROUP BY s22.FSCL_WK_END_DT.
Best regards