CREATE OR REPLACE VIEW V_Z1001Y 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
;
CREATE OR REPLACE VIEW V_Z1001M 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
;
CREATE OR REPLACE VIEW V_Z1001D 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
;
CREATE OR REPLACE VIEW V_Z1001W 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
;
CREATE OR REPLACE VIEW V_Z1001T 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
;
CREATE OR REPLACE VIEW V_Z1001H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
;
CREATE OR REPLACE VIEW V_Z1001P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
;
CREATE OR REPLACE VIEW V_Z1002Y 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
;
CREATE OR REPLACE VIEW V_Z1002M 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
;
CREATE OR REPLACE VIEW V_Z1002D 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
;
CREATE OR REPLACE VIEW V_Z1002W 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
;
CREATE OR REPLACE VIEW V_Z1002T 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
;
CREATE OR REPLACE VIEW V_Z1002H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY4
;
CREATE OR REPLACE VIEW V_Z1002P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY4
;
CREATE OR REPLACE VIEW V_Z1003Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1003M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1003D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1003W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1003T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1003H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY4
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1003P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY4
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1004Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1004M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1004D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1004W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1004T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1004H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1004P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1005Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1005M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1005D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1005W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1005T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1005H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1005P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,MIN(A.KEY5) "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY4
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1006Y 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
;
CREATE OR REPLACE VIEW V_Z1006M 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
;
CREATE OR REPLACE VIEW V_Z1006D 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
;
CREATE OR REPLACE VIEW V_Z1006W 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
;
CREATE OR REPLACE VIEW V_Z1006T 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"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
;
CREATE OR REPLACE VIEW V_Z1006H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY5
;
CREATE OR REPLACE VIEW V_Z1006P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY5
;
CREATE OR REPLACE VIEW V_Z1007Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1007M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1007D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1007W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1007T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1007H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY5
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1007P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,MIN(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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY5
,A.KEY6
;
CREATE OR REPLACE VIEW V_Z1008Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1008M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1008D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1008W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1008T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1008H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1008P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
;
CREATE OR REPLACE VIEW V_Z1009Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1009M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1009D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1009W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1009T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1009H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
,A.KEY8
;
CREATE OR REPLACE VIEW V_Z1009P AS SELECT
B.EX_TENDAYS "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,A.KEY6 "VKEY6"
,A.KEY7 "VKEY7"
,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"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TENDAYS
,A.KEY3
,A.KEY5
,A.KEY6
,A.KEY7
,A.KEY8
;
EXIT
