Created
January 15, 2021 15:50
-
-
Save jesuino/260362fae039ec4af9ac64e16f78e44a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
pil.externalId, | |
pil.processId, | |
nid, | |
nodetype, | |
nodename, | |
count(nid) as total_hits, | |
avg(execution_time) as averageExecutionTime, | |
min(execution_time) as minExecutionTime, | |
max(execution_time) as maxExecutionTime | |
from( | |
select | |
max(log_date) as lastLog, | |
processinstanceid as piid, | |
nodeinstanceid as niid, | |
nodeid as nid, | |
nodetype, | |
nodename, | |
DATEDIFF(SECOND, min(log_date), max(log_date)) as execution_time | |
from | |
NodeInstanceLog | |
group by | |
processinstanceid, | |
nodeinstanceid, | |
nid | |
order by lastLog | |
) | |
inner join | |
ProcessInstanceLog pil on pil.processInstanceId = piid | |
group by | |
pil.externalId, | |
nid, | |
nodename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment