I have included one 'where' clause which I was hoping to return output with reference to current_date but I am getting an error. Can someone please take a look at it and let me know what exactly I am doing wrong here. Snap attached here.
AND CASE WHEN (SELECT
CASE TD_Day_of_Week (CURRENT_DATE)
WHEN 1 THEN 'MON'
WHEN 2 THEN 'TUE'
WHEN 3 THEN 'WED'
WHEN 4 THEN 'THU'
WHEN 5 THEN 'FRI'
WHEN 6 THEN 'SAT'
WHEN 7 THEN 'SUN'
ELSE 'Unknown'
END) <> 'MON' THEN tpd."RELATIVE_GLOBAL_DAY" = -1
ELSE tpd."RELATIVE_GLOBAL_DAY" = -3
END