rem Get a rough picture of database activity by counting the number of 
rem executions per command type.  Command types are documented in the Oracle
rem Server Reference, as values for the COMMAND field in the V$SESSION table. 
rem
rem Uses the detail table created by OTRCDTL.SQL; prompts for table name if 
rem the variable dtl_table_name has not been defined.

select d.cmd_type, count(x.session_serial_end) "# Execs"
    from &&dtl_table_name d, v_192216243_f_5_e_9_7_3 x
    where d.sql_text_hash = x.sql_text_hash_end and 
	  d.sql_text_hash <> 0
    group by d.cmd_type;
