Skip to content

Instantly share code, notes, and snippets.

@jesuino
Created January 15, 2021 15:52
Show Gist options
  • Save jesuino/1ffb2808613e92352d6273cf74fb9505 to your computer and use it in GitHub Desktop.
Save jesuino/1ffb2808613e92352d6273cf74fb9505 to your computer and use it in GitHub Desktop.
select
processid,
nodeid as "NodeId",
DATEDIFF('SECOND', DATE '1970-01-01', log_date) AS "sec",
count(nodeid) as "total"
from
NodeInstanceLog
where
datediff('SECOND', log_date, current_timestamp) < 60
group by
processid,
nodeid,
DATEDIFF('SECOND', DATE '1970-01-01', log_date)
order by
DATEDIFF('SECOND', DATE '1970-01-01', log_date)
DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment