Need help creating a SQL statement that will count the amount of days when a RC_NUMBER is last set to DISP_CODE= QUARANTINE AND DISP_CODE = OK.
Example is attached and the SQL statement I currently have is below. Help is greatly appreciated.
GROUP BY RC_NUMBER
ORDER BY RC_NUMBER, TIME_STAMP