SQL Query to get the list of active schedule processes

SELECT  p.* , (CASE
              WHEN p.state = 1 THEN 'Wait'
              WHEN p.state = 2 THEN 'Ready'
              WHEN p.state = 3 THEN 'Running'
              WHEN p.state = 4 THEN 'Completed'
              WHEN p.state = 9 THEN 'Cancelled'
              WHEN p.state = 10 THEN 'Error'
              WHEN p.state = 12 THEN 'Succeeded'
              WHEN p.state = 13 THEN 'Paused'
              ELSE TO_CHAR (p.state)
          END)
             ess_request_status
FROM fusion.ess_request_history p
ORDER BY
p.requestid DESC

I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.