zOs/SQL/PDBGENCD

select timestamp - class1_elapsed seconds, timestamp, g.*
    from RZ2XX.TACCT_GENERAL g
    where     timestamp between '2012-05-18-09.00.00'
                          and '2012-05-18-12.10.00'
    --  or timestamp between '2011-08-11-23.41.00'
    --                  and '2011-08-11-23.47.00'
    --     timestamp in ( '2011-08-20-00.07.14.094155'
    --                   ,'2011-08-11-23.45.22.160512' )
    --   )and( corrName like 'CDT690%'
        and plan_name in -- ('MB5020'
                     --  ('NZ0610'
                         ('CI0900'
                         )
    order by plan_name, class2_cpu_total desc
;x;
select class2_elapsed,
    smallInt(1000* class2_cpu_total     /class2_elapsed) cpu,
    smallInt(1000* class3_global_cont  /class2_elapsed) "gloCon",
    smallInt(1000* class3_DB_IO        /class2_elapsed) "db io",
    smallInt(1000* class3_LOG_WRT_IO   /class2_elapsed) "logIO",
    sMB5020 (1000* (class2_cpu_total
     NZ0610      + class3_global_cont
                 + class3_DB_IO
                 + class3_LOG_WRT_IO ) /class2_elapsed) "sum",
        g.*
    from RZ2XX.TACCT_GENERAL g
    where timestamp > trunc_timestamp(current timestamp - 1 DAY, 'DD')
   --     and connect_id like 'MFT5614P%'
          and connect_id like 'TNT780%'
          and plan_name in ('TN7080')
   --     and insert >= 1
    ORDER BY timestamp      desc
  --ORDER BY CLASS1_ELAPSED desc
    with ur
;
X
select insert, class2_elapsed / insert , class2_su_cpu / insert,
        g.*
    from RZ2XX.TACCT_GENERAL g
    where timestamp > current timestamp - 9 DAY
          and plan_name = 'RB5000'
          and insert >= 1
    ORDER BY Timestamp asc
;
X
select class2_elapsed / insert , class2_su_cpu / insert,
        g.*
    from RZ2XX.TACCT_GENERAL g
--  where timestamp > current timestamp - 1 month
    where timestamp IN ('2010-02-02-01.05.50.881483'
                       ,'2010-01-30-06.38.00.929757')
          and plan_name = 'BE5020'
          and  insert > 500000 -- class2_elapsed >= 1000
    order by 1 desc, class2_elapsed desc
;
select -- class2_elapsed / insert , class2_su_cpu / insert,
        g.*
    from RZ2XX.TACCT_GENERAL g
    where timestamp > current timestamp - 5 DAY
          and plan_name = 'RB5000'
    ORDER BY Timestamp asc
;
X
select min(timestamp), max(timestamp)
    from RZ2XX.TACCT_GENERAL g
    with ur
;