zOs/SQL/PDBPKGRI

set current path oa1p;
SELECT min(timestamp), count(*) cnt,
   fosFmtE7(sum(SQL_STMTS_ISSUED)) stmts,
   fosFmtE7(sum(class7_cpu_total) ) "cpu tot",
   fosFmtE7(sum(class7_elapsed) / sum(SQL_STMTS_ISSUED)) "ela/stm",
   fosFmtE7(sum(class7_cpu_total) / sum(SQL_STMTS_ISSUED)) "cpu/stm",
   fosFmtE7(sum(CLASS8_SYNC_IO) / sum(SQL_STMTS_ISSUED)) "sIO/stm"
  FROM RZ2DD.TACCT_PROGRAM P -- RZ2
  where pck_id = 'RI0810'
      and timestamp > current timestamp - 12 days
  group by trunc_timestamp(timestamp, 'DD')
  order by trunc_timestamp(timestamp, 'DD') desc
  ;
SELECT min(timestamp), count(*) cnt,
   fosFmtE7(sum(SQL_STMTS_ISSUED)) stmts,
   fosFmtE7(sum(class7_elapsed) / sum(SQL_STMTS_ISSUED)) "ela/stm",
   fosFmtE7(sum(class7_cpu_total) / sum(SQL_STMTS_ISSUED)) "cpu/stm",
   fosFmtE7(sum(CLASS8_SYNC_IO) / sum(SQL_STMTS_ISSUED)) "sIO/stm"
  FROM RZ2DD.TACCT_PROGRAM P -- RZ2
  where pck_id = 'NZ6500'
      and timestamp > current timestamp - 125 days
  group by trunc_timestamp(timestamp, 'DAY')
  order by trunc_timestamp(timestamp, 'DAY') desc
;;;
SELECT *
  FROM RR2DD.TACCT_PROGRAM P -- RZ2
  where pck_id = 'NZ5820'
      and timestamp > current timestamp - 5 days
  order by timestamp desc
;