0 Replies Latest reply on Aug 16, 2008 5:48 PM by Sascha Janz

    sql getting average node duration per node/workflow

    Sascha Janz Master

      i want to get an average duration on each node an process

      i tried

      select
      e.name_, a.name_, avg(distinct b.duration_ )
      from jbpm_node a,
      jbpm_log b,
      jbpm_processinstance d,
      jbpm_processdefinition e,
      jbpm_token t
      
      where d.processdefinition_ = e.id_ and a.id_ = b.SOURCENODE_ and d.ROOTTOKEN_ = t.ID_ and t.NODE_ = a.ID_
      group by e.name_, a.name_
      order by 3 desc;
      
      


      but there is a mistake.

      any idea what is wrong with my select?