DBA Data[Home] [Help]

MATERIALIZED VIEW: APPS.ISC_DBI_SCR_001_MV

Source


SELECT /* 12.0: bug#4526784 */  0						UMARKER, 'SALES REP'					GRP_MARKER, f.sales_grp_id					PARENT_GRP_ID, f.sales_grp_id					SALES_GRP_ID, f.resource_id					RESOURCE_ID, grouping_id(f.class_code,f.customer_id)	CUSTOMER_FLAG, f.customer_id					CUSTOMER_ID, f.class_code					CLASS_CODE, f.item_category_id				ITEM_CATEGORY_ID, grouping_id(f.item_category_id)		ITEM_CAT_FLAG, decode( grouping_id(cal.ent_year_id,cal.ent_qtr_id, cal.ent_period_id,cal.week_id,cal.report_date_julian), 	30,cal.report_date_julian,29, cal.week_id, 	27,cal.ent_period_id,23,cal.ent_qtr_id,15,cal.ent_year_id)	TIME_ID, decode( grouping_id(cal.ent_year_id,cal.ent_qtr_id,cal.ent_period_id,cal.week_id,cal.report_date_julian), 	30,1,29,16,27,32,23,64,15,128)		PERIOD_TYPE_ID, cal.report_date_julian				DAY_ID, cal.week_id					WEEK_ID, cal.ent_period_id				ENT_PERIOD_ID, cal.ent_qtr_id					ENT_QTR_ID, cal.ent_year_id				ENT_YEAR_ID, grouping_id( f.resource_id, f.sales_grp_id,f.customer_id,f.class_code,f.item_category_id, 	     cal.ent_year_id,cal.ent_qtr_id,cal.ent_period_id,cal.week_id,cal.report_date_julian) GRP_ID, sum(f.booked_amt_g)			BOOKED_AMT_G, count(f.booked_amt_g)			BOOKED_AMT_G_CNT, sum(f.booked_amt_g1)			BOOKED_AMT_G1, count(f.booked_amt_g1)			BOOKED_AMT_G1_CNT, sum(f.returned_amt_g)			RETURNED_AMT_G, count(f.returned_amt_g)		RETURNED_AMT_G_CNT, sum(f.returned_amt_g1)			RETURNED_AMT_G1, count(f.returned_amt_g1)		RETURNED_AMT_G1_CNT, sum(f.net_booked_amt_g)		NET_BOOKED_AMT_G, count(f.net_booked_amt_g)		NET_BOOKED_AMT_G_CNT, sum(f.net_booked_amt_g1)		NET_BOOKED_AMT_G1, count(f.net_booked_amt_g1)		NET_BOOKED_AMT_G1_CNT, sum(f.net_booked_amt2_g-f.net_fulfilled_amt_g)		BACKLOG_AMT_G,  count(f.net_booked_amt2_g-f.net_fulfilled_amt_g)	BACKLOG_AMT_G_CNT,  sum(f.net_booked_amt2_g1-f.net_fulfilled_amt_g1)	BACKLOG_AMT_G1,  count(f.net_booked_amt2_g1-f.net_fulfilled_amt_g1)	BACKLOG_AMT_G1_CNT,  sum(f.prim_recognized_amt_g)		RECOGNIZED_AMT_G, count(f.prim_recognized_amt_g)		RECOGNIZED_AMT_G_CNT, sum(f.sec_recognized_amt_g)		RECOGNIZED_AMT_G1, count(f.sec_recognized_amt_g)		RECOGNIZED_AMT_G1_CNT, sum(f.prim_deferred_amt_g)		DEFERRED_AMT_G, count(f.prim_deferred_amt_g)		DEFERRED_AMT_G_CNT, sum(f.sec_deferred_amt_g)		DEFERRED_AMT_G1, count(f.sec_deferred_amt_g)		DEFERRED_AMT_G1_CNT, sum(f.booked_rev_prim_yr)   		BOOKED_REV_YR_G, sum(f.booked_rev_prim_qr)  		BOOKED_REV_QR_G, sum(f.booked_rev_prim_pe)     		BOOKED_REV_PE_G, sum(f.booked_rev_prim_wk)  		BOOKED_REV_WK_G, sum(f.booked_rev_sec_yr)    		BOOKED_REV_YR_G1, sum(f.booked_rev_sec_qr)  		BOOKED_REV_QR_G1, sum(f.booked_rev_sec_pe)  		BOOKED_REV_PE_G1, sum(f.booked_rev_sec_wk)  		BOOKED_REV_WK_G1, count(f.booked_rev_prim_yr)	  	BOOKED_REV_YR_G_CT, count(f.booked_rev_prim_qr) 	 	BOOKED_REV_QR_G_CT, count(f.booked_rev_prim_pe) 	 	BOOKED_REV_PE_G_CT, count(f.booked_rev_prim_wk)	   	BOOKED_REV_WK_G_CT, count(f.booked_rev_sec_yr)  		BOOKED_REV_YR_G1_CT, count(f.booked_rev_sec_qr)  		BOOKED_REV_QR_G1_CT, count(f.booked_rev_sec_pe)  		BOOKED_REV_PE_G1_CT, count(f.booked_rev_sec_wk)  		BOOKED_REV_WK_G1_CT, count(*)	CNT FROM isc_dbi_scr_000_mv	f,    FII.FII_TIME_DAY		cal WHERE f.time_id = cal.report_date_julian GROUP BY f.resource_id,f.sales_grp_id,    rollup(f.class_code,f.customer_id), rollup(f.item_category_id),    grouping sets(cal.ent_year_id,cal.ent_qtr_id,cal.ent_period_id,cal.week_id,cal.report_date_julian) UNION ALL SELECT	/* 12.0: bug#4526784 */  1						UMARKER, grp.umarker					GRP_MARKER, grp.parent_prg_id				PARENT_GRP_ID, grp.prg_id					SALES_GRP_ID, NULL						RESOURCE_ID, grouping_id(f.class_code,f.customer_id)	CUSTOMER_FLAG, f.customer_id					CUSTOMER_ID, f.class_code					CLASS_CODE, f.item_category_id				ITEM_CATEGORY_ID, grouping_id(f.item_category_id)		ITEM_CAT_FLAG, decode( grouping_id(cal.ent_year_id,cal.ent_qtr_id, cal.ent_period_id,cal.week_id,cal.report_date_julian), 	30,cal.report_date_julian,29, cal.week_id, 	27,cal.ent_period_id,23,cal.ent_qtr_id,15,cal.ent_year_id)	TIME_ID, decode( grouping_id(cal.ent_year_id,cal.ent_qtr_id,cal.ent_period_id,cal.week_id,cal.report_date_julian), 	30,1,29,16,27,32,23,64,15,128)		PERIOD_TYPE_ID, cal.report_date_julian				DAY_ID, cal.week_id					WEEK_ID, cal.ent_period_id				ENT_PERIOD_ID, cal.ent_qtr_id					ENT_QTR_ID, cal.ent_year_id				ENT_YEAR_ID, grouping_id( grp.umarker, grp.parent_prg_id,grp.prg_id,f.customer_id,f.class_code,f.item_category_id,  cal.ent_year_id,cal.ent_qtr_id, cal.ent_period_id, cal.week_id, cal.report_date_julian) 							GRP_ID, sum(f.booked_amt_g)			BOOKED_AMT_G, count(f.booked_amt_g)			BOOKED_AMT_G_CNT, sum(f.booked_amt_g1)			BOOKED_AMT_G1, count(f.booked_amt_g1)			BOOKED_AMT_G1_CNT, sum(f.returned_amt_g)			RETURNED_AMT_G, count(f.returned_amt_g)		RETURNED_AMT_G_CNT, sum(f.returned_amt_g1)			RETURNED_AMT_G1, count(f.returned_amt_g1)		RETURNED_AMT_G1_CNT, sum(f.net_booked_amt_g)		NET_BOOKED_AMT_G, count(f.net_booked_amt_g)		NET_BOOKED_AMT_G_CNT, sum(f.net_booked_amt_g1)		NET_BOOKED_AMT_G1, count(f.net_booked_amt_g1)		NET_BOOKED_AMT_G1_CNT, sum(f.net_booked_amt2_g-f.net_fulfilled_amt_g)		BACKLOG_AMT_G,  count(f.net_booked_amt2_g-f.net_fulfilled_amt_g)	BACKLOG_AMT_G_CNT,  sum(f.net_booked_amt2_g1-f.net_fulfilled_amt_g1)	BACKLOG_AMT_G1,  count(f.net_booked_amt2_g1-f.net_fulfilled_amt_g1)	BACKLOG_AMT_G1_CNT,  sum(f.prim_recognized_amt_g)		RECOGNIZED_AMT_G, count(f.prim_recognized_amt_g)		RECOGNIZED_AMT_G_CNT, sum(f.sec_recognized_amt_g)		RECOGNIZED_AMT_G1, count(f.sec_recognized_amt_g)		RECOGNIZED_AMT_G1_CNT, sum(f.prim_deferred_amt_g)		DEFERRED_AMT_G, count(f.prim_deferred_amt_g)		DEFERRED_AMT_G_CNT, sum(f.sec_deferred_amt_g)		DEFERRED_AMT_G1, count(f.sec_deferred_amt_g)		DEFERRED_AMT_G1_CNT, sum(f.booked_rev_prim_yr)   		BOOKED_REV_YR_G, sum(f.booked_rev_prim_qr)  		BOOKED_REV_QR_G, sum(f.booked_rev_prim_pe)     		BOOKED_REV_PE_G, sum(f.booked_rev_prim_wk)  		BOOKED_REV_WK_G, sum(f.booked_rev_sec_yr)    		BOOKED_REV_YR_G1, sum(f.booked_rev_sec_qr)  		BOOKED_REV_QR_G1, sum(f.booked_rev_sec_pe)  		BOOKED_REV_PE_G1, sum(f.booked_rev_sec_wk)  		BOOKED_REV_WK_G1, count(f.booked_rev_prim_yr)	  	BOOKED_REV_YR_G_CT, count(f.booked_rev_prim_qr) 	 	BOOKED_REV_QR_G_CT, count(f.booked_rev_prim_pe) 	 	BOOKED_REV_PE_G_CT, count(f.booked_rev_prim_wk)	   	BOOKED_REV_WK_G_CT, count(f.booked_rev_sec_yr)  		BOOKED_REV_YR_G1_CT, count(f.booked_rev_sec_qr)  		BOOKED_REV_QR_G1_CT, count(f.booked_rev_sec_pe)  		BOOKED_REV_PE_G1_CT, count(f.booked_rev_sec_wk)  		BOOKED_REV_WK_G1_CT, count(*)	CNT FROM isc_dbi_scr_000_mv	f,   oki_rs_group_mv		grp,   FII.FII_TIME_DAY		cal WHERE f.time_id = cal.report_date_julian   AND f.sales_grp_id = grp.rg_id GROUP BY grp.umarker, grp.prg_id, grp.parent_prg_id,   rollup(f.class_code,f.customer_id), rollup(f.item_category_id),   grouping sets(cal.ent_year_id,cal.ent_qtr_id,cal.ent_period_id,cal.week_id,cal.report_date_julian)