Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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