Category: PIPER-RX Managing Workflows Paper 2008 Name: MWP002 - Step 1 - WF Runtime Stats ReportDefFileName: .\MWP002 - Step 1 - WF Runtime Stats.fr3 ===Begin Comments=== Copyright (C) 2009 G Piper This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. a copy of the GNU Affero General Public Licenses provided is part of the down load Terms and Conditions available on our site www.piper-rx.com or you can refere to www.gnu.org/licenses/gpl.html ===End Comments=== ===Begin SQL=== -- **************************************************** -- ** PIPER-RX - Managing Workflows Paper -- ** -- ** Copyright (C) 2008 G.Piper -- ** -- ** Step 1 - Workflow runtime statistics -- ** -- ** Version 1.0 Nov-08 G.Piper - PIPER-Rx -- **************************************************** SELECT to_char(sysdate, 'DD-Mon-YY HH24:MI') report_date, wi.item_type workflow, substr(witt.display_name,1,40) display_name, count(*) sample_size, round(min(months_between(wi.end_date, wi.begin_date)),1) minimum_months, round(avg(months_between(wi.end_date, wi.begin_date)),1) average_months, round(max(months_between(wi.end_date, wi.begin_date)),1) maximum_months, round(min(wi.end_date - wi.begin_date),1) minimum_days, round(avg(wi.end_date - wi.begin_date),1) average_days, round(max(wi.end_date - wi.begin_date),1) maximum_days FROM applsys.wf_items wi, applsys.wf_item_types_tl witt WHERE wi.end_date is not null and wi.item_type = witt.name and witt.language = userenv('LANG') GROUP by to_char(sysdate, 'DD-Mon-YY HH24:MI'), wi.item_type, witt.display_name ORDER by wi.item_type ===End SQL=== ===Begin Report Definition===