CREATE OR REPLACE VIEW V_B0801Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY7
;
CREATE OR REPLACE VIEW V_B0801M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY7
;
CREATE OR REPLACE VIEW V_B0801D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY7
;
CREATE OR REPLACE VIEW V_B0801W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY7
;
CREATE OR REPLACE VIEW V_B0801T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY7
;
CREATE OR REPLACE VIEW V_B0802Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0802M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0802D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0802W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0802T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0803Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0803M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0803D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0803W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0803T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0804Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0804M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0804D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0804W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0804T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0805Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0805M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0805D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0805W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0805T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0806Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0806M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0806D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0806W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0806T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0807Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0807M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0807D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0807W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0807T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0808Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0808M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0808D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0808W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0808T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0809Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0809M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0809D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0809W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0809T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0810Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0810M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0810D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0810W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0810T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0811Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0811M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0811D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0811W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0811T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0812Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0812M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0812D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0812W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0812T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0813Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0813M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0813D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0813W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0813T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0814Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0814M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0814D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0814W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0814T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0815Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0815M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0815D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0815W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0815T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0816Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0816M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0816D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0816W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0816T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0817Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0817M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0817D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0817W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0817T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0818Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0818M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0818D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0818W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0818T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0819Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0819M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0819D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0819W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0819T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0820Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0820M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0820D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0820W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0820T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0821Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0821M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0821D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0821W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0821T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0822Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0822M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0822D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0822W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0822T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0823Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0823M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0823D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0823W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0823T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0824Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0824M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0824D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0824W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0824T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0825Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0825M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0825D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0825W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0825T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0826Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0826M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0826D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0826W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0826T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0827Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0827M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0827D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0827W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0827T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0828Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0828M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0828D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0828W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0828T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0829Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0829M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0829D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0829W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0829T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0830Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0830M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0830D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0830W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0830T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0831Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0831M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0831D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0831W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0831T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0832Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0832M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0832D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0832W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0832T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0833Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0833M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0833D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0833W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0833T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0834Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0834M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0834D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0834W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0834T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0835Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0835M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0835D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0835W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0835T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0836Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0836M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0836D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0836W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0836T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0837Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0837M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0837D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0837W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0837T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0838Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0838M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0838D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0838W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0838T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0839Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0839M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0839D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0839W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0839T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0840Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0840M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0840D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0840W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0840T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0841Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0841M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0841D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0841W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0841T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0842Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0842M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0842D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0842W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0842T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0843Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0843M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0843D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0843W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0843T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0844Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0844M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0844D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0844W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0844T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0845Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0845M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0845D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0845W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0845T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0846Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0846M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0846D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0846W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0846T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0847Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0847M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0847D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0847W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0847T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0848Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0848M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0848D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0848W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0848T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0849Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0849M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0849D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0849W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0849T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0850Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0850M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0850D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0850W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0850T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0851Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0851M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0851D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0851W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0851T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0852Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0852M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0852D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0852W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0852T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0853Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0853M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0853D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0853W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0853T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0854Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0854M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0854D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0854W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0854T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0855Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0855M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0855D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0855W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0855T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0856Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0856M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0856D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0856W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0856T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0857Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0857M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0857D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0857W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0857T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0858Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0858M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0858D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0858W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0858T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0859Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0859M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0859D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0859W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0859T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0860Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0860M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0860D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0860W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0860T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0861Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0861M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0861D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0861W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0861T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0862Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0862M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0862D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0862W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0862T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0863Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0863M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0863D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0863W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0863T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0864Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0864M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0864D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0864W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0864T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0865Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0865M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0865D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0865W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0865T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0866Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0866M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0866D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0866W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0866T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0867Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0867M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0867D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0867W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0867T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0868Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0868M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0868D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0868W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0868T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0869Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0869M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0869D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0869W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0869T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0870Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0870M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0870D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0870W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0870T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0871Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0871M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0871D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0871W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0871T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0872Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0872M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0872D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0872W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0872T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0873Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0873M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0873D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0873W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0873T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0874Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0874M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0874D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0874W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0874T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0875Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0875M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0875D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0875W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0875T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0876Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0876M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0876D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0876W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0876T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0877Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0877M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0877D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0877W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0877T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0878Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0878M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0878D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0878W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0878T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0879Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0879M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0879D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0879W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0879T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0880Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0880M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0880D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0880W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0880T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0881Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0881M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0881D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0881W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0881T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_B0882Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0882M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0882D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0882W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0882T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0883Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0883M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0883D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0883W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0883T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0884Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0884M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0884D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0884W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_SIIRE A, EX_DAY B
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B0884T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,MIN(A.KEY8) "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
FROM EX_DAY B, EX_SIIRE A
WHERE A.DATE1 = B.EX_DATE
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
,A.KEY10
;
EXIT
