zOs/SQL/PDBPKGPL

set current path = 'OA1P';
select PLAN_NAME plan
     , substr(PCK_COLLECTION_ID, 1, 8) col
     , substr(PCK_ID, 1, 8)            pkg
     , fosFmtE7(sum(occurrences))      occ
     , fosFmtE7(sum(SQL_STMTS_ISSUED)) sqls
     , fosFmtE7(sum(CLASS7_ELAPSED))   ela
     , fosFmtE7(sum(CLASS7_CPU_TOTAL)) cpu
     , count(distinct timestamp)      "days"
     , min(timestamp)                  von
     , max(timestamp)                  bis
    FROM RZ2DD.TACCT_PROGRAM P
    where plan_name = 'PC0680'
       and timestamp > current timestamp - 12 days
    group by plan_name, pck_collection_id, pck_id
    order by plan_name, pck_collection_id, pck_id
    with ur
;