Hello SQL Gurus, I’m struggling to create a query that shows the ‘summary_status’ from today, yesterday, two days ago, and three days ago. The query I currently have simply shows the current ‘summary_status’, but I cannot figure out how to use sysdate to return ‘summary_status’ for prior days in the same query. I played around with using sysdate –1 within the query but I’m receiving errors. Does anyone have any thoughts on how to deal with this ? Underlying database is Oracle. Thank you in advance!
SELECT DISTINCT
name,
owner,
Client,
CASE summary\_status
WHEN 0 THEN 'Good'
WHEN 1 THEN 'Fair'
ELSE 'Attention'
END summary\_status,
support\_group,
FROM CLIENT