




DROP MATERIALIZED VIEW WVIEW0011_YYYYMM_W02;
DROP TABLE WVIEW0011_YYYYMM_W02 PURGE;

CREATE TABLE WVIEW0011_YYYYMM_W02
(
VPERIOD VARCHAR2(9) NOT NULL
, VKEY1 VARCHAR2(60) NOT NULL
, VKEY2 VARCHAR2(60) NOT NULL
, VKEY3 VARCHAR2(60) NOT NULL
, VKEY4 VARCHAR2(60) NOT NULL
, VKEY5 VARCHAR2(60) NOT NULL
, VKEY6 VARCHAR2(60) NOT NULL
, VKEY7 VARCHAR2(60) NOT NULL
, VKEY8 VARCHAR2(60) NOT NULL
, VKEY9 VARCHAR2(60) NOT NULL
, VKEY10 VARCHAR2(60) NOT NULL
, VKEY11 VARCHAR2(60) NOT NULL
, VKEY12 VARCHAR2(60) NOT NULL
, VKEY13 VARCHAR2(60) NOT NULL
, VKEY14 VARCHAR2(60) NOT NULL
, VKEY15 VARCHAR2(60) NOT NULL
, VKEY16 VARCHAR2(60) NOT NULL
, VKEY17 VARCHAR2(60) NOT NULL
, VKEY31 VARCHAR2(60) NOT NULL
, VKEY32 VARCHAR2(60) NOT NULL
, VKEY60 VARCHAR2(60) NOT NULL
, VD1 NUMBER
, VD2 NUMBER
, VD3 NUMBER
, VD4 NUMBER
, VD5 NUMBER
, VD6 NUMBER
, VD7 NUMBER
, VD8 NUMBER
, VD9 NUMBER
, VD10 NUMBER
, VD11 NUMBER
, VD12 NUMBER
, VD13 NUMBER
, VD14 NUMBER
, VD15 NUMBER
, VD16 NUMBER
, VD17 NUMBER
, VD18 NUMBER
, VD19 NUMBER
, VD20 NUMBER
, VD21 NUMBER
, VD22 NUMBER
, VD23 NUMBER
, VD24 NUMBER
, VD25 NUMBER
, VD26 NUMBER
, VD27 NUMBER
, VD28 NUMBER
, VD29 NUMBER
, VD30 NUMBER
, VD31 NUMBER
, VD32 NUMBER
, VD33 NUMBER
, VD34 NUMBER
, VD35 NUMBER
, VD36 NUMBER
, VD37 NUMBER
, VD38 NUMBER
, VD39 NUMBER
, VD40 NUMBER
, VD41 NUMBER
, VD42 NUMBER
, VD43 NUMBER
, VD44 NUMBER
, VD45 NUMBER
, VD46 NUMBER
, VD47 NUMBER
, VD48 NUMBER
, VD49 NUMBER
, VD50 NUMBER
, VD51 NUMBER
, VD52 NUMBER
, VD53 NUMBER
, VD54 NUMBER
, VD55 NUMBER
, VD56 NUMBER
, VD57 NUMBER
, VD58 NUMBER
, VD59 NUMBER
, VD60 NUMBER
, VKEYP NUMBER
)
NOLOGGING
;
INSERT /*+ APPEND */ INTO WVIEW0011_YYYYMM_W02
SELECT T0.*, ROWNUM "VKEYP" FROM (SELECT
A.VPERIOD
,' ' "VKEY1"
,' ' "VKEY2"
,A.VKEY3 "VKEY3"
,' ' "VKEY4"
,' ' "VKEY5"
,' ' "VKEY6"
,' ' "VKEY7"
,' ' "VKEY8"
,A.VKEY9 "VKEY9"
,A.VKEY10 "VKEY10"
,' ' "VKEY11"
,' ' "VKEY12"
,' ' "VKEY13"
,' ' "VKEY14"
,' ' "VKEY15"
,A.VKEY16 "VKEY16"
,' ' "VKEY17"
,' ' "VKEY31"
,' ' "VKEY32"
,' ' "VKEY60"
,SUM(A.VD1) "VD1"
,SUM(A.VD2) "VD2"
,SUM(A.VD3) "VD3"
,SUM(A.VD4) "VD4"
,SUM(A.VD5) "VD5"
,SUM(A.VD6) "VD6"
,SUM(A.VD7) "VD7"
,SUM(A.VD8) "VD8"
,SUM(A.VD9) "VD9"
,SUM(A.VD10) "VD10"
,SUM(A.VD11) "VD11"
,SUM(A.VD12) "VD12"
,SUM(A.VD13) "VD13"
,SUM(A.VD14) "VD14"
,SUM(A.VD15) "VD15"
,SUM(A.VD16) "VD16"
,SUM(A.VD17) "VD17"
,SUM(A.VD18) "VD18"
,SUM(A.VD19) "VD19"
,SUM(A.VD20) "VD20"
,SUM(A.VD21) "VD21"
,SUM(A.VD22) "VD22"
,SUM(A.VD23) "VD23"
,SUM(A.VD24) "VD24"
,SUM(A.VD25) "VD25"
,SUM(A.VD26) "VD26"
,SUM(A.VD27) "VD27"
,SUM(A.VD28) "VD28"
,SUM(A.VD29) "VD29"
,SUM(A.VD30) "VD30"
,SUM(A.VD31) "VD31"
,SUM(A.VD32) "VD32"
,SUM(A.VD33) "VD33"
,SUM(A.VD34) "VD34"
,SUM(A.VD35) "VD35"
,SUM(A.VD36) "VD36"
,SUM(A.VD37) "VD37"
,SUM(A.VD38) "VD38"
,SUM(A.VD39) "VD39"
,SUM(A.VD40) "VD40"
,SUM(A.VD41) "VD41"
,SUM(A.VD42) "VD42"
,SUM(A.VD43) "VD43"
,SUM(A.VD44) "VD44"
,SUM(A.VD45) "VD45"
,SUM(A.VD46) "VD46"
,SUM(A.VD47) "VD47"
,SUM(A.VD48) "VD48"
,SUM(A.VD49) "VD49"
,SUM(A.VD50) "VD50"
,SUM(A.VD51) "VD51"
,SUM(A.VD52) "VD52"
,SUM(A.VD53) "VD53"
,SUM(A.VD54) "VD54"
,SUM(A.VD55) "VD55"
,SUM(A.VD56) "VD56"
,SUM(A.VD57) "VD57"
,SUM(A.VD58) "VD58"
,SUM(A.VD59) "VD59"
,SUM(A.VD60) "VD60"
FROM WVIEW0011_YYYYMM A
GROUP BY
A.VPERIOD
,A.VKEY3
,A.VKEY9
,A.VKEY10
,A.VKEY16
) T0;
ALTER TABLE WVIEW0011_YYYYMM_W02 ADD PRIMARY KEY
(
VKEYP
)
NOLOGGING
;


CREATE INDEX IDX_WVIEW0011_YYYYMM_W02_3
ON WVIEW0011_YYYYMM_W02
(
VPERIOD
,VKEY3
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_YYYYMM_W02_9
ON WVIEW0011_YYYYMM_W02
(
VPERIOD
,VKEY9
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_YYYYMM_W02_10
ON WVIEW0011_YYYYMM_W02
(
VPERIOD
,VKEY10
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_YYYYMM_W02_16
ON WVIEW0011_YYYYMM_W02
(
VPERIOD
,VKEY16
)
NOLOGGING
;


COMMIT;


DROP MATERIALIZED VIEW WVIEW0011_TERM_W02;
DROP TABLE WVIEW0011_TERM_W02 PURGE;

CREATE TABLE WVIEW0011_TERM_W02
(
VPERIOD VARCHAR2(9) NOT NULL
, VKEY1 VARCHAR2(60) NOT NULL
, VKEY2 VARCHAR2(60) NOT NULL
, VKEY3 VARCHAR2(60) NOT NULL
, VKEY4 VARCHAR2(60) NOT NULL
, VKEY5 VARCHAR2(60) NOT NULL
, VKEY6 VARCHAR2(60) NOT NULL
, VKEY7 VARCHAR2(60) NOT NULL
, VKEY8 VARCHAR2(60) NOT NULL
, VKEY9 VARCHAR2(60) NOT NULL
, VKEY10 VARCHAR2(60) NOT NULL
, VKEY11 VARCHAR2(60) NOT NULL
, VKEY12 VARCHAR2(60) NOT NULL
, VKEY13 VARCHAR2(60) NOT NULL
, VKEY14 VARCHAR2(60) NOT NULL
, VKEY15 VARCHAR2(60) NOT NULL
, VKEY16 VARCHAR2(60) NOT NULL
, VKEY17 VARCHAR2(60) NOT NULL
, VKEY31 VARCHAR2(60) NOT NULL
, VKEY32 VARCHAR2(60) NOT NULL
, VKEY60 VARCHAR2(60) NOT NULL
, VD1 NUMBER
, VD2 NUMBER
, VD3 NUMBER
, VD4 NUMBER
, VD5 NUMBER
, VD6 NUMBER
, VD7 NUMBER
, VD8 NUMBER
, VD9 NUMBER
, VD10 NUMBER
, VD11 NUMBER
, VD12 NUMBER
, VD13 NUMBER
, VD14 NUMBER
, VD15 NUMBER
, VD16 NUMBER
, VD17 NUMBER
, VD18 NUMBER
, VD19 NUMBER
, VD20 NUMBER
, VD21 NUMBER
, VD22 NUMBER
, VD23 NUMBER
, VD24 NUMBER
, VD25 NUMBER
, VD26 NUMBER
, VD27 NUMBER
, VD28 NUMBER
, VD29 NUMBER
, VD30 NUMBER
, VD31 NUMBER
, VD32 NUMBER
, VD33 NUMBER
, VD34 NUMBER
, VD35 NUMBER
, VD36 NUMBER
, VD37 NUMBER
, VD38 NUMBER
, VD39 NUMBER
, VD40 NUMBER
, VD41 NUMBER
, VD42 NUMBER
, VD43 NUMBER
, VD44 NUMBER
, VD45 NUMBER
, VD46 NUMBER
, VD47 NUMBER
, VD48 NUMBER
, VD49 NUMBER
, VD50 NUMBER
, VD51 NUMBER
, VD52 NUMBER
, VD53 NUMBER
, VD54 NUMBER
, VD55 NUMBER
, VD56 NUMBER
, VD57 NUMBER
, VD58 NUMBER
, VD59 NUMBER
, VD60 NUMBER
, VKEYP NUMBER
)
NOLOGGING
;
INSERT /*+ APPEND */ INTO WVIEW0011_TERM_W02
SELECT T0.*, ROWNUM "VKEYP" FROM (SELECT
A.VPERIOD
,' ' "VKEY1"
,' ' "VKEY2"
,A.VKEY3 "VKEY3"
,' ' "VKEY4"
,' ' "VKEY5"
,' ' "VKEY6"
,' ' "VKEY7"
,' ' "VKEY8"
,A.VKEY9 "VKEY9"
,A.VKEY10 "VKEY10"
,' ' "VKEY11"
,' ' "VKEY12"
,' ' "VKEY13"
,' ' "VKEY14"
,' ' "VKEY15"
,A.VKEY16 "VKEY16"
,' ' "VKEY17"
,' ' "VKEY31"
,' ' "VKEY32"
,' ' "VKEY60"
,SUM(A.VD1) "VD1"
,SUM(A.VD2) "VD2"
,SUM(A.VD3) "VD3"
,SUM(A.VD4) "VD4"
,SUM(A.VD5) "VD5"
,SUM(A.VD6) "VD6"
,SUM(A.VD7) "VD7"
,SUM(A.VD8) "VD8"
,SUM(A.VD9) "VD9"
,SUM(A.VD10) "VD10"
,SUM(A.VD11) "VD11"
,SUM(A.VD12) "VD12"
,SUM(A.VD13) "VD13"
,SUM(A.VD14) "VD14"
,SUM(A.VD15) "VD15"
,SUM(A.VD16) "VD16"
,SUM(A.VD17) "VD17"
,SUM(A.VD18) "VD18"
,SUM(A.VD19) "VD19"
,SUM(A.VD20) "VD20"
,SUM(A.VD21) "VD21"
,SUM(A.VD22) "VD22"
,SUM(A.VD23) "VD23"
,SUM(A.VD24) "VD24"
,SUM(A.VD25) "VD25"
,SUM(A.VD26) "VD26"
,SUM(A.VD27) "VD27"
,SUM(A.VD28) "VD28"
,SUM(A.VD29) "VD29"
,SUM(A.VD30) "VD30"
,SUM(A.VD31) "VD31"
,SUM(A.VD32) "VD32"
,SUM(A.VD33) "VD33"
,SUM(A.VD34) "VD34"
,SUM(A.VD35) "VD35"
,SUM(A.VD36) "VD36"
,SUM(A.VD37) "VD37"
,SUM(A.VD38) "VD38"
,SUM(A.VD39) "VD39"
,SUM(A.VD40) "VD40"
,SUM(A.VD41) "VD41"
,SUM(A.VD42) "VD42"
,SUM(A.VD43) "VD43"
,SUM(A.VD44) "VD44"
,SUM(A.VD45) "VD45"
,SUM(A.VD46) "VD46"
,SUM(A.VD47) "VD47"
,SUM(A.VD48) "VD48"
,SUM(A.VD49) "VD49"
,SUM(A.VD50) "VD50"
,SUM(A.VD51) "VD51"
,SUM(A.VD52) "VD52"
,SUM(A.VD53) "VD53"
,SUM(A.VD54) "VD54"
,SUM(A.VD55) "VD55"
,SUM(A.VD56) "VD56"
,SUM(A.VD57) "VD57"
,SUM(A.VD58) "VD58"
,SUM(A.VD59) "VD59"
,SUM(A.VD60) "VD60"
FROM WVIEW0011_TERM A
GROUP BY
A.VPERIOD
,A.VKEY3
,A.VKEY9
,A.VKEY10
,A.VKEY16
) T0;
ALTER TABLE WVIEW0011_TERM_W02 ADD PRIMARY KEY
(
VKEYP
)
NOLOGGING
;



CREATE INDEX IDX_WVIEW0011_TERM_W02_3
ON WVIEW0011_TERM_W02
(
VPERIOD
,VKEY3
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_TERM_W02_9
ON WVIEW0011_TERM_W02
(
VPERIOD
,VKEY9
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_TERM_W02_10
ON WVIEW0011_TERM_W02
(
VPERIOD
,VKEY10
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_TERM_W02_16
ON WVIEW0011_TERM_W02
(
VPERIOD
,VKEY16
)
NOLOGGING
;


COMMIT;


DROP MATERIALIZED VIEW WVIEW0011_HALFYEAR_W02;
DROP TABLE WVIEW0011_HALFYEAR_W02 PURGE;

CREATE TABLE WVIEW0011_HALFYEAR_W02
(
VPERIOD VARCHAR2(9) NOT NULL
, VKEY1 VARCHAR2(60) NOT NULL
, VKEY2 VARCHAR2(60) NOT NULL
, VKEY3 VARCHAR2(60) NOT NULL
, VKEY4 VARCHAR2(60) NOT NULL
, VKEY5 VARCHAR2(60) NOT NULL
, VKEY6 VARCHAR2(60) NOT NULL
, VKEY7 VARCHAR2(60) NOT NULL
, VKEY8 VARCHAR2(60) NOT NULL
, VKEY9 VARCHAR2(60) NOT NULL
, VKEY10 VARCHAR2(60) NOT NULL
, VKEY11 VARCHAR2(60) NOT NULL
, VKEY12 VARCHAR2(60) NOT NULL
, VKEY13 VARCHAR2(60) NOT NULL
, VKEY14 VARCHAR2(60) NOT NULL
, VKEY15 VARCHAR2(60) NOT NULL
, VKEY16 VARCHAR2(60) NOT NULL
, VKEY17 VARCHAR2(60) NOT NULL
, VKEY31 VARCHAR2(60) NOT NULL
, VKEY32 VARCHAR2(60) NOT NULL
, VKEY60 VARCHAR2(60) NOT NULL
, VD1 NUMBER
, VD2 NUMBER
, VD3 NUMBER
, VD4 NUMBER
, VD5 NUMBER
, VD6 NUMBER
, VD7 NUMBER
, VD8 NUMBER
, VD9 NUMBER
, VD10 NUMBER
, VD11 NUMBER
, VD12 NUMBER
, VD13 NUMBER
, VD14 NUMBER
, VD15 NUMBER
, VD16 NUMBER
, VD17 NUMBER
, VD18 NUMBER
, VD19 NUMBER
, VD20 NUMBER
, VD21 NUMBER
, VD22 NUMBER
, VD23 NUMBER
, VD24 NUMBER
, VD25 NUMBER
, VD26 NUMBER
, VD27 NUMBER
, VD28 NUMBER
, VD29 NUMBER
, VD30 NUMBER
, VD31 NUMBER
, VD32 NUMBER
, VD33 NUMBER
, VD34 NUMBER
, VD35 NUMBER
, VD36 NUMBER
, VD37 NUMBER
, VD38 NUMBER
, VD39 NUMBER
, VD40 NUMBER
, VD41 NUMBER
, VD42 NUMBER
, VD43 NUMBER
, VD44 NUMBER
, VD45 NUMBER
, VD46 NUMBER
, VD47 NUMBER
, VD48 NUMBER
, VD49 NUMBER
, VD50 NUMBER
, VD51 NUMBER
, VD52 NUMBER
, VD53 NUMBER
, VD54 NUMBER
, VD55 NUMBER
, VD56 NUMBER
, VD57 NUMBER
, VD58 NUMBER
, VD59 NUMBER
, VD60 NUMBER
, VKEYP NUMBER
)
NOLOGGING
;
INSERT /*+ APPEND */ INTO WVIEW0011_HALFYEAR_W02
SELECT T0.*, ROWNUM "VKEYP" FROM (SELECT
A.VPERIOD
,' ' "VKEY1"
,' ' "VKEY2"
,A.VKEY3 "VKEY3"
,' ' "VKEY4"
,' ' "VKEY5"
,' ' "VKEY6"
,' ' "VKEY7"
,' ' "VKEY8"
,A.VKEY9 "VKEY9"
,A.VKEY10 "VKEY10"
,' ' "VKEY11"
,' ' "VKEY12"
,' ' "VKEY13"
,' ' "VKEY14"
,' ' "VKEY15"
,A.VKEY16 "VKEY16"
,' ' "VKEY17"
,' ' "VKEY31"
,' ' "VKEY32"
,' ' "VKEY60"
,SUM(A.VD1) "VD1"
,SUM(A.VD2) "VD2"
,SUM(A.VD3) "VD3"
,SUM(A.VD4) "VD4"
,SUM(A.VD5) "VD5"
,SUM(A.VD6) "VD6"
,SUM(A.VD7) "VD7"
,SUM(A.VD8) "VD8"
,SUM(A.VD9) "VD9"
,SUM(A.VD10) "VD10"
,SUM(A.VD11) "VD11"
,SUM(A.VD12) "VD12"
,SUM(A.VD13) "VD13"
,SUM(A.VD14) "VD14"
,SUM(A.VD15) "VD15"
,SUM(A.VD16) "VD16"
,SUM(A.VD17) "VD17"
,SUM(A.VD18) "VD18"
,SUM(A.VD19) "VD19"
,SUM(A.VD20) "VD20"
,SUM(A.VD21) "VD21"
,SUM(A.VD22) "VD22"
,SUM(A.VD23) "VD23"
,SUM(A.VD24) "VD24"
,SUM(A.VD25) "VD25"
,SUM(A.VD26) "VD26"
,SUM(A.VD27) "VD27"
,SUM(A.VD28) "VD28"
,SUM(A.VD29) "VD29"
,SUM(A.VD30) "VD30"
,SUM(A.VD31) "VD31"
,SUM(A.VD32) "VD32"
,SUM(A.VD33) "VD33"
,SUM(A.VD34) "VD34"
,SUM(A.VD35) "VD35"
,SUM(A.VD36) "VD36"
,SUM(A.VD37) "VD37"
,SUM(A.VD38) "VD38"
,SUM(A.VD39) "VD39"
,SUM(A.VD40) "VD40"
,SUM(A.VD41) "VD41"
,SUM(A.VD42) "VD42"
,SUM(A.VD43) "VD43"
,SUM(A.VD44) "VD44"
,SUM(A.VD45) "VD45"
,SUM(A.VD46) "VD46"
,SUM(A.VD47) "VD47"
,SUM(A.VD48) "VD48"
,SUM(A.VD49) "VD49"
,SUM(A.VD50) "VD50"
,SUM(A.VD51) "VD51"
,SUM(A.VD52) "VD52"
,SUM(A.VD53) "VD53"
,SUM(A.VD54) "VD54"
,SUM(A.VD55) "VD55"
,SUM(A.VD56) "VD56"
,SUM(A.VD57) "VD57"
,SUM(A.VD58) "VD58"
,SUM(A.VD59) "VD59"
,SUM(A.VD60) "VD60"
FROM WVIEW0011_HALFYEAR A
GROUP BY
A.VPERIOD
,A.VKEY3
,A.VKEY9
,A.VKEY10
,A.VKEY16
) T0;
ALTER TABLE WVIEW0011_HALFYEAR_W02 ADD PRIMARY KEY
(
VKEYP
)
NOLOGGING
;



CREATE INDEX IDX_WVIEW0011_HALFYEAR_W02_3
ON WVIEW0011_HALFYEAR_W02
(
VPERIOD
,VKEY3
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_HALFYEAR_W02_9
ON WVIEW0011_HALFYEAR_W02
(
VPERIOD
,VKEY9
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_HALFYEAR_W02_10
ON WVIEW0011_HALFYEAR_W02
(
VPERIOD
,VKEY10
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_HALFYEAR_W02_16
ON WVIEW0011_HALFYEAR_W02
(
VPERIOD
,VKEY16
)
NOLOGGING
;


COMMIT;


DROP MATERIALIZED VIEW WVIEW0011_YYYY_W02;
DROP TABLE WVIEW0011_YYYY_W02 PURGE;

CREATE TABLE WVIEW0011_YYYY_W02
(
VPERIOD VARCHAR2(9) NOT NULL
, VKEY1 VARCHAR2(60) NOT NULL
, VKEY2 VARCHAR2(60) NOT NULL
, VKEY3 VARCHAR2(60) NOT NULL
, VKEY4 VARCHAR2(60) NOT NULL
, VKEY5 VARCHAR2(60) NOT NULL
, VKEY6 VARCHAR2(60) NOT NULL
, VKEY7 VARCHAR2(60) NOT NULL
, VKEY8 VARCHAR2(60) NOT NULL
, VKEY9 VARCHAR2(60) NOT NULL
, VKEY10 VARCHAR2(60) NOT NULL
, VKEY11 VARCHAR2(60) NOT NULL
, VKEY12 VARCHAR2(60) NOT NULL
, VKEY13 VARCHAR2(60) NOT NULL
, VKEY14 VARCHAR2(60) NOT NULL
, VKEY15 VARCHAR2(60) NOT NULL
, VKEY16 VARCHAR2(60) NOT NULL
, VKEY17 VARCHAR2(60) NOT NULL
, VKEY31 VARCHAR2(60) NOT NULL
, VKEY32 VARCHAR2(60) NOT NULL
, VKEY60 VARCHAR2(60) NOT NULL
, VD1 NUMBER
, VD2 NUMBER
, VD3 NUMBER
, VD4 NUMBER
, VD5 NUMBER
, VD6 NUMBER
, VD7 NUMBER
, VD8 NUMBER
, VD9 NUMBER
, VD10 NUMBER
, VD11 NUMBER
, VD12 NUMBER
, VD13 NUMBER
, VD14 NUMBER
, VD15 NUMBER
, VD16 NUMBER
, VD17 NUMBER
, VD18 NUMBER
, VD19 NUMBER
, VD20 NUMBER
, VD21 NUMBER
, VD22 NUMBER
, VD23 NUMBER
, VD24 NUMBER
, VD25 NUMBER
, VD26 NUMBER
, VD27 NUMBER
, VD28 NUMBER
, VD29 NUMBER
, VD30 NUMBER
, VD31 NUMBER
, VD32 NUMBER
, VD33 NUMBER
, VD34 NUMBER
, VD35 NUMBER
, VD36 NUMBER
, VD37 NUMBER
, VD38 NUMBER
, VD39 NUMBER
, VD40 NUMBER
, VD41 NUMBER
, VD42 NUMBER
, VD43 NUMBER
, VD44 NUMBER
, VD45 NUMBER
, VD46 NUMBER
, VD47 NUMBER
, VD48 NUMBER
, VD49 NUMBER
, VD50 NUMBER
, VD51 NUMBER
, VD52 NUMBER
, VD53 NUMBER
, VD54 NUMBER
, VD55 NUMBER
, VD56 NUMBER
, VD57 NUMBER
, VD58 NUMBER
, VD59 NUMBER
, VD60 NUMBER
, VKEYP NUMBER
)
NOLOGGING
;
INSERT /*+ APPEND */ INTO WVIEW0011_YYYY_W02
SELECT T0.*, ROWNUM "VKEYP" FROM (SELECT
A.VPERIOD
,' ' "VKEY1"
,' ' "VKEY2"
,A.VKEY3 "VKEY3"
,' ' "VKEY4"
,' ' "VKEY5"
,' ' "VKEY6"
,' ' "VKEY7"
,' ' "VKEY8"
,A.VKEY9 "VKEY9"
,A.VKEY10 "VKEY10"
,' ' "VKEY11"
,' ' "VKEY12"
,' ' "VKEY13"
,' ' "VKEY14"
,' ' "VKEY15"
,A.VKEY16 "VKEY16"
,' ' "VKEY17"
,' ' "VKEY31"
,' ' "VKEY32"
,' ' "VKEY60"
,SUM(A.VD1) "VD1"
,SUM(A.VD2) "VD2"
,SUM(A.VD3) "VD3"
,SUM(A.VD4) "VD4"
,SUM(A.VD5) "VD5"
,SUM(A.VD6) "VD6"
,SUM(A.VD7) "VD7"
,SUM(A.VD8) "VD8"
,SUM(A.VD9) "VD9"
,SUM(A.VD10) "VD10"
,SUM(A.VD11) "VD11"
,SUM(A.VD12) "VD12"
,SUM(A.VD13) "VD13"
,SUM(A.VD14) "VD14"
,SUM(A.VD15) "VD15"
,SUM(A.VD16) "VD16"
,SUM(A.VD17) "VD17"
,SUM(A.VD18) "VD18"
,SUM(A.VD19) "VD19"
,SUM(A.VD20) "VD20"
,SUM(A.VD21) "VD21"
,SUM(A.VD22) "VD22"
,SUM(A.VD23) "VD23"
,SUM(A.VD24) "VD24"
,SUM(A.VD25) "VD25"
,SUM(A.VD26) "VD26"
,SUM(A.VD27) "VD27"
,SUM(A.VD28) "VD28"
,SUM(A.VD29) "VD29"
,SUM(A.VD30) "VD30"
,SUM(A.VD31) "VD31"
,SUM(A.VD32) "VD32"
,SUM(A.VD33) "VD33"
,SUM(A.VD34) "VD34"
,SUM(A.VD35) "VD35"
,SUM(A.VD36) "VD36"
,SUM(A.VD37) "VD37"
,SUM(A.VD38) "VD38"
,SUM(A.VD39) "VD39"
,SUM(A.VD40) "VD40"
,SUM(A.VD41) "VD41"
,SUM(A.VD42) "VD42"
,SUM(A.VD43) "VD43"
,SUM(A.VD44) "VD44"
,SUM(A.VD45) "VD45"
,SUM(A.VD46) "VD46"
,SUM(A.VD47) "VD47"
,SUM(A.VD48) "VD48"
,SUM(A.VD49) "VD49"
,SUM(A.VD50) "VD50"
,SUM(A.VD51) "VD51"
,SUM(A.VD52) "VD52"
,SUM(A.VD53) "VD53"
,SUM(A.VD54) "VD54"
,SUM(A.VD55) "VD55"
,SUM(A.VD56) "VD56"
,SUM(A.VD57) "VD57"
,SUM(A.VD58) "VD58"
,SUM(A.VD59) "VD59"
,SUM(A.VD60) "VD60"
FROM WVIEW0011_YYYY A
GROUP BY
A.VPERIOD
,A.VKEY3
,A.VKEY9
,A.VKEY10
,A.VKEY16
) T0;
ALTER TABLE WVIEW0011_YYYY_W02 ADD PRIMARY KEY
(
VKEYP
)
NOLOGGING
;



CREATE INDEX IDX_WVIEW0011_YYYY_W02_3
ON WVIEW0011_YYYY_W02
(
VPERIOD
,VKEY3
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_YYYY_W02_9
ON WVIEW0011_YYYY_W02
(
VPERIOD
,VKEY9
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_YYYY_W02_10
ON WVIEW0011_YYYY_W02
(
VPERIOD
,VKEY10
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_YYYY_W02_16
ON WVIEW0011_YYYY_W02
(
VPERIOD
,VKEY16
)
NOLOGGING
;


COMMIT;


DROP MATERIALIZED VIEW WVIEW0011_TENDAYS_W02;
DROP TABLE WVIEW0011_TENDAYS_W02 PURGE;

CREATE TABLE WVIEW0011_TENDAYS_W02
(
VPERIOD VARCHAR2(9) NOT NULL
, VKEY1 VARCHAR2(60) NOT NULL
, VKEY2 VARCHAR2(60) NOT NULL
, VKEY3 VARCHAR2(60) NOT NULL
, VKEY4 VARCHAR2(60) NOT NULL
, VKEY5 VARCHAR2(60) NOT NULL
, VKEY6 VARCHAR2(60) NOT NULL
, VKEY7 VARCHAR2(60) NOT NULL
, VKEY8 VARCHAR2(60) NOT NULL
, VKEY9 VARCHAR2(60) NOT NULL
, VKEY10 VARCHAR2(60) NOT NULL
, VKEY11 VARCHAR2(60) NOT NULL
, VKEY12 VARCHAR2(60) NOT NULL
, VKEY13 VARCHAR2(60) NOT NULL
, VKEY14 VARCHAR2(60) NOT NULL
, VKEY15 VARCHAR2(60) NOT NULL
, VKEY16 VARCHAR2(60) NOT NULL
, VKEY17 VARCHAR2(60) NOT NULL
, VKEY31 VARCHAR2(60) NOT NULL
, VKEY32 VARCHAR2(60) NOT NULL
, VKEY60 VARCHAR2(60) NOT NULL
, VD1 NUMBER
, VD2 NUMBER
, VD3 NUMBER
, VD4 NUMBER
, VD5 NUMBER
, VD6 NUMBER
, VD7 NUMBER
, VD8 NUMBER
, VD9 NUMBER
, VD10 NUMBER
, VD11 NUMBER
, VD12 NUMBER
, VD13 NUMBER
, VD14 NUMBER
, VD15 NUMBER
, VD16 NUMBER
, VD17 NUMBER
, VD18 NUMBER
, VD19 NUMBER
, VD20 NUMBER
, VD21 NUMBER
, VD22 NUMBER
, VD23 NUMBER
, VD24 NUMBER
, VD25 NUMBER
, VD26 NUMBER
, VD27 NUMBER
, VD28 NUMBER
, VD29 NUMBER
, VD30 NUMBER
, VD31 NUMBER
, VD32 NUMBER
, VD33 NUMBER
, VD34 NUMBER
, VD35 NUMBER
, VD36 NUMBER
, VD37 NUMBER
, VD38 NUMBER
, VD39 NUMBER
, VD40 NUMBER
, VD41 NUMBER
, VD42 NUMBER
, VD43 NUMBER
, VD44 NUMBER
, VD45 NUMBER
, VD46 NUMBER
, VD47 NUMBER
, VD48 NUMBER
, VD49 NUMBER
, VD50 NUMBER
, VD51 NUMBER
, VD52 NUMBER
, VD53 NUMBER
, VD54 NUMBER
, VD55 NUMBER
, VD56 NUMBER
, VD57 NUMBER
, VD58 NUMBER
, VD59 NUMBER
, VD60 NUMBER
, VKEYP NUMBER
)
NOLOGGING
;
INSERT /*+ APPEND */ INTO WVIEW0011_TENDAYS_W02
SELECT T0.*, ROWNUM "VKEYP" FROM (SELECT
A.VPERIOD
,' ' "VKEY1"
,' ' "VKEY2"
,A.VKEY3 "VKEY3"
,' ' "VKEY4"
,' ' "VKEY5"
,' ' "VKEY6"
,' ' "VKEY7"
,' ' "VKEY8"
,A.VKEY9 "VKEY9"
,A.VKEY10 "VKEY10"
,' ' "VKEY11"
,' ' "VKEY12"
,' ' "VKEY13"
,' ' "VKEY14"
,' ' "VKEY15"
,A.VKEY16 "VKEY16"
,' ' "VKEY17"
,' ' "VKEY31"
,' ' "VKEY32"
,' ' "VKEY60"
,SUM(A.VD1) "VD1"
,SUM(A.VD2) "VD2"
,SUM(A.VD3) "VD3"
,SUM(A.VD4) "VD4"
,SUM(A.VD5) "VD5"
,SUM(A.VD6) "VD6"
,SUM(A.VD7) "VD7"
,SUM(A.VD8) "VD8"
,SUM(A.VD9) "VD9"
,SUM(A.VD10) "VD10"
,SUM(A.VD11) "VD11"
,SUM(A.VD12) "VD12"
,SUM(A.VD13) "VD13"
,SUM(A.VD14) "VD14"
,SUM(A.VD15) "VD15"
,SUM(A.VD16) "VD16"
,SUM(A.VD17) "VD17"
,SUM(A.VD18) "VD18"
,SUM(A.VD19) "VD19"
,SUM(A.VD20) "VD20"
,SUM(A.VD21) "VD21"
,SUM(A.VD22) "VD22"
,SUM(A.VD23) "VD23"
,SUM(A.VD24) "VD24"
,SUM(A.VD25) "VD25"
,SUM(A.VD26) "VD26"
,SUM(A.VD27) "VD27"
,SUM(A.VD28) "VD28"
,SUM(A.VD29) "VD29"
,SUM(A.VD30) "VD30"
,SUM(A.VD31) "VD31"
,SUM(A.VD32) "VD32"
,SUM(A.VD33) "VD33"
,SUM(A.VD34) "VD34"
,SUM(A.VD35) "VD35"
,SUM(A.VD36) "VD36"
,SUM(A.VD37) "VD37"
,SUM(A.VD38) "VD38"
,SUM(A.VD39) "VD39"
,SUM(A.VD40) "VD40"
,SUM(A.VD41) "VD41"
,SUM(A.VD42) "VD42"
,SUM(A.VD43) "VD43"
,SUM(A.VD44) "VD44"
,SUM(A.VD45) "VD45"
,SUM(A.VD46) "VD46"
,SUM(A.VD47) "VD47"
,SUM(A.VD48) "VD48"
,SUM(A.VD49) "VD49"
,SUM(A.VD50) "VD50"
,SUM(A.VD51) "VD51"
,SUM(A.VD52) "VD52"
,SUM(A.VD53) "VD53"
,SUM(A.VD54) "VD54"
,SUM(A.VD55) "VD55"
,SUM(A.VD56) "VD56"
,SUM(A.VD57) "VD57"
,SUM(A.VD58) "VD58"
,SUM(A.VD59) "VD59"
,SUM(A.VD60) "VD60"
FROM WVIEW0011_TENDAYS A
GROUP BY
A.VPERIOD
,A.VKEY3
,A.VKEY9
,A.VKEY10
,A.VKEY16
) T0;
ALTER TABLE WVIEW0011_TENDAYS_W02 ADD PRIMARY KEY
(
VKEYP
)
NOLOGGING
;



CREATE INDEX IDX_WVIEW0011_TENDAYS_W02_3
ON WVIEW0011_TENDAYS_W02
(
VPERIOD
,VKEY3
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_TENDAYS_W02_9
ON WVIEW0011_TENDAYS_W02
(
VPERIOD
,VKEY9
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_TENDAYS_W02_10
ON WVIEW0011_TENDAYS_W02
(
VPERIOD
,VKEY10
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0011_TENDAYS_W02_16
ON WVIEW0011_TENDAYS_W02
(
VPERIOD
,VKEY16
)
NOLOGGING
;


COMMIT;


DROP MATERIALIZED VIEW WVIEW0012_HALFYEAR_W02;
DROP TABLE WVIEW0012_HALFYEAR_W02 PURGE;

CREATE TABLE WVIEW0012_HALFYEAR_W02
(
VPERIOD VARCHAR2(9) NOT NULL
, VKEY1 VARCHAR2(60) NOT NULL
, VKEY2 VARCHAR2(60) NOT NULL
, VKEY3 VARCHAR2(60) NOT NULL
, VKEY4 VARCHAR2(60) NOT NULL
, VKEY5 VARCHAR2(60) NOT NULL
, VKEY6 VARCHAR2(60) NOT NULL
, VKEY7 VARCHAR2(60) NOT NULL
, VKEY8 VARCHAR2(60) NOT NULL
, VKEY9 VARCHAR2(60) NOT NULL
, VKEY10 VARCHAR2(60) NOT NULL
, VKEY11 VARCHAR2(60) NOT NULL
, VKEY12 VARCHAR2(60) NOT NULL
, VKEY13 VARCHAR2(60) NOT NULL
, VKEY14 VARCHAR2(60) NOT NULL
, VKEY15 VARCHAR2(60) NOT NULL
, VKEY16 VARCHAR2(60) NOT NULL
, VKEY17 VARCHAR2(60) NOT NULL
, VKEY31 VARCHAR2(60) NOT NULL
, VKEY32 VARCHAR2(60) NOT NULL
, VKEY60 VARCHAR2(60) NOT NULL
, VD1 NUMBER
, VD2 NUMBER
, VD3 NUMBER
, VD4 NUMBER
, VD5 NUMBER
, VD6 NUMBER
, VD7 NUMBER
, VD8 NUMBER
, VD9 NUMBER
, VD10 NUMBER
, VD11 NUMBER
, VD12 NUMBER
, VD13 NUMBER
, VD14 NUMBER
, VD15 NUMBER
, VD16 NUMBER
, VD17 NUMBER
, VD18 NUMBER
, VD19 NUMBER
, VD20 NUMBER
, VD21 NUMBER
, VD22 NUMBER
, VD23 NUMBER
, VD24 NUMBER
, VD25 NUMBER
, VD26 NUMBER
, VD27 NUMBER
, VD28 NUMBER
, VD29 NUMBER
, VD30 NUMBER
, VD31 NUMBER
, VD32 NUMBER
, VD33 NUMBER
, VD34 NUMBER
, VD35 NUMBER
, VD36 NUMBER
, VD37 NUMBER
, VD38 NUMBER
, VD39 NUMBER
, VD40 NUMBER
, VD41 NUMBER
, VD42 NUMBER
, VD43 NUMBER
, VD44 NUMBER
, VD45 NUMBER
, VD46 NUMBER
, VD47 NUMBER
, VD48 NUMBER
, VD49 NUMBER
, VD50 NUMBER
, VD51 NUMBER
, VD52 NUMBER
, VD53 NUMBER
, VD54 NUMBER
, VD55 NUMBER
, VD56 NUMBER
, VD57 NUMBER
, VD58 NUMBER
, VD59 NUMBER
, VD60 NUMBER
, VKEYP NUMBER
)
NOLOGGING
;
INSERT /*+ APPEND */ INTO WVIEW0012_HALFYEAR_W02
SELECT T0.*, ROWNUM "VKEYP" FROM (SELECT
A.VPERIOD
,' ' "VKEY1"
,' ' "VKEY2"
,A.VKEY3 "VKEY3"
,' ' "VKEY4"
,' ' "VKEY5"
,' ' "VKEY6"
,' ' "VKEY7"
,' ' "VKEY8"
,A.VKEY9 "VKEY9"
,A.VKEY10 "VKEY10"
,' ' "VKEY11"
,' ' "VKEY12"
,' ' "VKEY13"
,' ' "VKEY14"
,' ' "VKEY15"
,A.VKEY16 "VKEY16"
,' ' "VKEY17"
,' ' "VKEY31"
,' ' "VKEY32"
,' ' "VKEY60"
,SUM(A.VD1) "VD1"
,SUM(A.VD2) "VD2"
,SUM(A.VD3) "VD3"
,SUM(A.VD4) "VD4"
,SUM(A.VD5) "VD5"
,SUM(A.VD6) "VD6"
,SUM(A.VD7) "VD7"
,SUM(A.VD8) "VD8"
,SUM(A.VD9) "VD9"
,SUM(A.VD10) "VD10"
,SUM(A.VD11) "VD11"
,SUM(A.VD12) "VD12"
,SUM(A.VD13) "VD13"
,SUM(A.VD14) "VD14"
,SUM(A.VD15) "VD15"
,SUM(A.VD16) "VD16"
,SUM(A.VD17) "VD17"
,SUM(A.VD18) "VD18"
,SUM(A.VD19) "VD19"
,SUM(A.VD20) "VD20"
,SUM(A.VD21) "VD21"
,SUM(A.VD22) "VD22"
,SUM(A.VD23) "VD23"
,SUM(A.VD24) "VD24"
,SUM(A.VD25) "VD25"
,SUM(A.VD26) "VD26"
,SUM(A.VD27) "VD27"
,SUM(A.VD28) "VD28"
,SUM(A.VD29) "VD29"
,SUM(A.VD30) "VD30"
,SUM(A.VD31) "VD31"
,SUM(A.VD32) "VD32"
,SUM(A.VD33) "VD33"
,SUM(A.VD34) "VD34"
,SUM(A.VD35) "VD35"
,SUM(A.VD36) "VD36"
,SUM(A.VD37) "VD37"
,SUM(A.VD38) "VD38"
,SUM(A.VD39) "VD39"
,SUM(A.VD40) "VD40"
,SUM(A.VD41) "VD41"
,SUM(A.VD42) "VD42"
,SUM(A.VD43) "VD43"
,SUM(A.VD44) "VD44"
,SUM(A.VD45) "VD45"
,SUM(A.VD46) "VD46"
,SUM(A.VD47) "VD47"
,SUM(A.VD48) "VD48"
,SUM(A.VD49) "VD49"
,SUM(A.VD50) "VD50"
,SUM(A.VD51) "VD51"
,SUM(A.VD52) "VD52"
,SUM(A.VD53) "VD53"
,SUM(A.VD54) "VD54"
,SUM(A.VD55) "VD55"
,SUM(A.VD56) "VD56"
,SUM(A.VD57) "VD57"
,SUM(A.VD58) "VD58"
,SUM(A.VD59) "VD59"
,SUM(A.VD60) "VD60"
FROM WVIEW0012_HALFYEAR A
GROUP BY
A.VPERIOD
,A.VKEY3
,A.VKEY9
,A.VKEY10
,A.VKEY16
) T0;
ALTER TABLE WVIEW0012_HALFYEAR_W02 ADD PRIMARY KEY
(
VKEYP
)
NOLOGGING
;



CREATE INDEX IDX_WVIEW0012_HALFYEAR_W02_3
ON WVIEW0012_HALFYEAR_W02
(
VPERIOD
,VKEY3
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0012_HALFYEAR_W02_9
ON WVIEW0012_HALFYEAR_W02
(
VPERIOD
,VKEY9
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0012_HALFYEAR_W02_10
ON WVIEW0012_HALFYEAR_W02
(
VPERIOD
,VKEY10
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0012_HALFYEAR_W02_16
ON WVIEW0012_HALFYEAR_W02
(
VPERIOD
,VKEY16
)
NOLOGGING
;


COMMIT;


DROP MATERIALIZED VIEW WVIEW0012_YYYY_W02;
DROP TABLE WVIEW0012_YYYY_W02 PURGE;

CREATE TABLE WVIEW0012_YYYY_W02
(
VPERIOD VARCHAR2(9) NOT NULL
, VKEY1 VARCHAR2(60) NOT NULL
, VKEY2 VARCHAR2(60) NOT NULL
, VKEY3 VARCHAR2(60) NOT NULL
, VKEY4 VARCHAR2(60) NOT NULL
, VKEY5 VARCHAR2(60) NOT NULL
, VKEY6 VARCHAR2(60) NOT NULL
, VKEY7 VARCHAR2(60) NOT NULL
, VKEY8 VARCHAR2(60) NOT NULL
, VKEY9 VARCHAR2(60) NOT NULL
, VKEY10 VARCHAR2(60) NOT NULL
, VKEY11 VARCHAR2(60) NOT NULL
, VKEY12 VARCHAR2(60) NOT NULL
, VKEY13 VARCHAR2(60) NOT NULL
, VKEY14 VARCHAR2(60) NOT NULL
, VKEY15 VARCHAR2(60) NOT NULL
, VKEY16 VARCHAR2(60) NOT NULL
, VKEY17 VARCHAR2(60) NOT NULL
, VKEY31 VARCHAR2(60) NOT NULL
, VKEY32 VARCHAR2(60) NOT NULL
, VKEY60 VARCHAR2(60) NOT NULL
, VD1 NUMBER
, VD2 NUMBER
, VD3 NUMBER
, VD4 NUMBER
, VD5 NUMBER
, VD6 NUMBER
, VD7 NUMBER
, VD8 NUMBER
, VD9 NUMBER
, VD10 NUMBER
, VD11 NUMBER
, VD12 NUMBER
, VD13 NUMBER
, VD14 NUMBER
, VD15 NUMBER
, VD16 NUMBER
, VD17 NUMBER
, VD18 NUMBER
, VD19 NUMBER
, VD20 NUMBER
, VD21 NUMBER
, VD22 NUMBER
, VD23 NUMBER
, VD24 NUMBER
, VD25 NUMBER
, VD26 NUMBER
, VD27 NUMBER
, VD28 NUMBER
, VD29 NUMBER
, VD30 NUMBER
, VD31 NUMBER
, VD32 NUMBER
, VD33 NUMBER
, VD34 NUMBER
, VD35 NUMBER
, VD36 NUMBER
, VD37 NUMBER
, VD38 NUMBER
, VD39 NUMBER
, VD40 NUMBER
, VD41 NUMBER
, VD42 NUMBER
, VD43 NUMBER
, VD44 NUMBER
, VD45 NUMBER
, VD46 NUMBER
, VD47 NUMBER
, VD48 NUMBER
, VD49 NUMBER
, VD50 NUMBER
, VD51 NUMBER
, VD52 NUMBER
, VD53 NUMBER
, VD54 NUMBER
, VD55 NUMBER
, VD56 NUMBER
, VD57 NUMBER
, VD58 NUMBER
, VD59 NUMBER
, VD60 NUMBER
, VKEYP NUMBER
)
NOLOGGING
;
INSERT /*+ APPEND */ INTO WVIEW0012_YYYY_W02
SELECT T0.*, ROWNUM "VKEYP" FROM (SELECT
A.VPERIOD
,' ' "VKEY1"
,' ' "VKEY2"
,A.VKEY3 "VKEY3"
,' ' "VKEY4"
,' ' "VKEY5"
,' ' "VKEY6"
,' ' "VKEY7"
,' ' "VKEY8"
,A.VKEY9 "VKEY9"
,A.VKEY10 "VKEY10"
,' ' "VKEY11"
,' ' "VKEY12"
,' ' "VKEY13"
,' ' "VKEY14"
,' ' "VKEY15"
,A.VKEY16 "VKEY16"
,' ' "VKEY17"
,' ' "VKEY31"
,' ' "VKEY32"
,' ' "VKEY60"
,SUM(A.VD1) "VD1"
,SUM(A.VD2) "VD2"
,SUM(A.VD3) "VD3"
,SUM(A.VD4) "VD4"
,SUM(A.VD5) "VD5"
,SUM(A.VD6) "VD6"
,SUM(A.VD7) "VD7"
,SUM(A.VD8) "VD8"
,SUM(A.VD9) "VD9"
,SUM(A.VD10) "VD10"
,SUM(A.VD11) "VD11"
,SUM(A.VD12) "VD12"
,SUM(A.VD13) "VD13"
,SUM(A.VD14) "VD14"
,SUM(A.VD15) "VD15"
,SUM(A.VD16) "VD16"
,SUM(A.VD17) "VD17"
,SUM(A.VD18) "VD18"
,SUM(A.VD19) "VD19"
,SUM(A.VD20) "VD20"
,SUM(A.VD21) "VD21"
,SUM(A.VD22) "VD22"
,SUM(A.VD23) "VD23"
,SUM(A.VD24) "VD24"
,SUM(A.VD25) "VD25"
,SUM(A.VD26) "VD26"
,SUM(A.VD27) "VD27"
,SUM(A.VD28) "VD28"
,SUM(A.VD29) "VD29"
,SUM(A.VD30) "VD30"
,SUM(A.VD31) "VD31"
,SUM(A.VD32) "VD32"
,SUM(A.VD33) "VD33"
,SUM(A.VD34) "VD34"
,SUM(A.VD35) "VD35"
,SUM(A.VD36) "VD36"
,SUM(A.VD37) "VD37"
,SUM(A.VD38) "VD38"
,SUM(A.VD39) "VD39"
,SUM(A.VD40) "VD40"
,SUM(A.VD41) "VD41"
,SUM(A.VD42) "VD42"
,SUM(A.VD43) "VD43"
,SUM(A.VD44) "VD44"
,SUM(A.VD45) "VD45"
,SUM(A.VD46) "VD46"
,SUM(A.VD47) "VD47"
,SUM(A.VD48) "VD48"
,SUM(A.VD49) "VD49"
,SUM(A.VD50) "VD50"
,SUM(A.VD51) "VD51"
,SUM(A.VD52) "VD52"
,SUM(A.VD53) "VD53"
,SUM(A.VD54) "VD54"
,SUM(A.VD55) "VD55"
,SUM(A.VD56) "VD56"
,SUM(A.VD57) "VD57"
,SUM(A.VD58) "VD58"
,SUM(A.VD59) "VD59"
,SUM(A.VD60) "VD60"
FROM WVIEW0012_YYYY A
GROUP BY
A.VPERIOD
,A.VKEY3
,A.VKEY9
,A.VKEY10
,A.VKEY16
) T0;
ALTER TABLE WVIEW0012_YYYY_W02 ADD PRIMARY KEY
(
VKEYP
)
NOLOGGING
;



CREATE INDEX IDX_WVIEW0012_YYYY_W02_3
ON WVIEW0012_YYYY_W02
(
VPERIOD
,VKEY3
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0012_YYYY_W02_9
ON WVIEW0012_YYYY_W02
(
VPERIOD
,VKEY9
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0012_YYYY_W02_10
ON WVIEW0012_YYYY_W02
(
VPERIOD
,VKEY10
)
NOLOGGING
;

CREATE INDEX IDX_WVIEW0012_YYYY_W02_16
ON WVIEW0012_YYYY_W02
(
VPERIOD
,VKEY16
)
NOLOGGING
;

COMMIT;


EXIT
