DBA Data[Home] [Help]

MATERIALIZED VIEW: APPS.BIM_I_ORD_COL_MV

Source


SELECT /* Dummy Comment */
    1 umark
    ,a.time_booked_date_id transaction_create_date
    ,c.source_code_id source_code_id
    ,c.object_id object_id
    ,c.object_type object_type
    ,b.vbh_category_id  vbh_category_id
    ,c.category_id  primary_category_id
    ,'ORDER' metric_type
    ,c.child_object_id child_object_id
    ,c.child_object_type child_object_type
    ,c.object_region object_region
    ,c.object_country object_country
    ,c.object_status object_status
    ,c.activity_id activity_id
    ,sum(a.booked_amt_f) booked_amt_f
    ,count(a.booked_amt_f) booked_amt_f_c
    ,sum(a.invoiced_amt_f) invoiced_amt_f
    ,count(a.invoiced_amt_f) invoiced_amt_f_c
    ,sum(a.booked_amt_g1) booked_amt_s
    ,count(a.booked_amt_g1) booked_amt_s_c
    ,sum(a.invoiced_amt_g1) invoiced_amt_s
    ,count(a.invoiced_amt_g1) invoiced_amt_s_c
    ,count(*) all_c
FROM   ISC.ISC_BOOK_SUM2_F a,
       ENI.ENI_OLTP_ITEM_STAR b,
       BIM.BIM_I_SOURCE_CODES c
WHERE
       a.inventory_item_id = b.inventory_item_id
       and a.inv_org_id = b.organization_id
       and a.h_marketing_source_code_id = c.source_code_id
       and a.ORDER_CATEGORY_ID ='ORDER'
       and a.LINE_CATEGORY_CODE ='ORDER'
GROUP BY a.time_booked_date_id
         ,c.source_code_id
         ,c.object_id
	 ,c.object_type
	 ,b.vbh_category_id
	 ,c.category_id
	 ,c.child_object_id
         ,c.child_object_type
	 ,c.object_region
	 ,c.object_country
	 ,c.object_status
         ,c.activity_id