DBA Data[Home] [Help]

VIEW: SYS.DBA_ADVISOR_SQLA_REC_SUM

Source

View Text - Preformatted

select max(b.owner_name) as owner,
             max(a.task_id) as task_id,
             max(b.name) as task_name,
             max(a.rec_id) as rec_id,
             count(*) as total_stmts,
             sum(a.pre_cost) as total_precost,
             sum(a.post_cost) as total_postcost
      from wri$_adv_sqla_stmts a, wri$_adv_tasks b
      where a.task_id = b.id
        and b.advisor_id = 2
      group by a.task_id, a.rec_id
View Text - HTML Formatted

SELECT MAX(B.OWNER_NAME) AS OWNER
, MAX(A.TASK_ID) AS TASK_ID
, MAX(B.NAME) AS TASK_NAME
, MAX(A.REC_ID) AS REC_ID
, COUNT(*) AS TOTAL_STMTS
, SUM(A.PRE_COST) AS TOTAL_PRECOST
, SUM(A.POST_COST) AS TOTAL_POSTCOST
FROM WRI$_ADV_SQLA_STMTS A
, WRI$_ADV_TASKS B
WHERE A.TASK_ID = B.ID
AND B.ADVISOR_ID = 2 GROUP BY A.TASK_ID
, A.REC_ID