Code:
SELECT DBNAME as Library,
SYS_TNAME as File,
decimal(timesadv,6) as Advised,
date(lastadv) as Last_Adv,time(lastadv) as Time_Adv,
decimal(querycost,6) as Cost,
decimal(queryest,6) as Avg_Cost,
decimal(mticreated,6) as MTI_Create,
date(lastmtiuse) as MTI_LastUsed,
substr(KEYSADV,1,40) as Keys_Advised,
substr(leadkeys,1,40) as Key_Order
FROM qsys2/sysixadv
where mticreated > 0
ORDER BY queryest DESC