CREATE OR REPLACE VIEW V_A03001Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY7
;
CREATE OR REPLACE VIEW V_A03001M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY7
;
CREATE OR REPLACE VIEW V_A03001D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY7
;
CREATE OR REPLACE VIEW V_A03001W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY7
;
CREATE OR REPLACE VIEW V_A03001T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY7
;
CREATE OR REPLACE VIEW V_A03001H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY7
;
DROP VIEW V_A03001P
;
CREATE OR REPLACE VIEW V_A03004Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03004M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03004D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03004W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03004T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03004H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03004P
;
CREATE OR REPLACE VIEW V_A03005Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03005M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03005D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03005W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03005T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03005H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03005P
;
CREATE OR REPLACE VIEW V_A03006Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03006M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03006D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03006W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03006T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03006H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY4
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03006P
;
CREATE OR REPLACE VIEW V_A03007Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03007M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03007D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03007W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03007T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03007H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03007P
;
CREATE OR REPLACE VIEW V_A03008Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03008M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03008D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03008W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03008T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03008H 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"
,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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03008P
;
CREATE OR REPLACE VIEW V_A03009Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03009M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03009D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03009W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03009T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03009H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03009P
;
CREATE OR REPLACE VIEW V_A03010Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03010M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03010D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03010W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03010T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03010H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03010P
;
CREATE OR REPLACE VIEW V_A03011Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03011M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03011D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03011W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03011T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03011H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03011P
;
CREATE OR REPLACE VIEW V_A03012Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03012M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03012D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03012W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03012T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03012H 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"
,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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
DROP VIEW V_A03012P
;
CREATE OR REPLACE VIEW V_A03013Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03013M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03013D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03013W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03013T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03013H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03013P
;
CREATE OR REPLACE VIEW V_A03014Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03014M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03014D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03014W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03014T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03014H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03014P
;
CREATE OR REPLACE VIEW V_A03015Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03015M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03015D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03015W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03015T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03015H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03015P
;
CREATE OR REPLACE VIEW V_A03016Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03016M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03016D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03016W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03016T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03016H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03016P
;
CREATE OR REPLACE VIEW V_A03017Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03017M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03017D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03017W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03017T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03017H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03017P
;
CREATE OR REPLACE VIEW V_A03018Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03018M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03018D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03018W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03018T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03018H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03018P
;
CREATE OR REPLACE VIEW V_A03019Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03019M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03019D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03019W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03019T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03019H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03019P
;
CREATE OR REPLACE VIEW V_A03020Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03020M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03020D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03020W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03020T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03020H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03020P
;
CREATE OR REPLACE VIEW V_A03021Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03021M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03021D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03021W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03021T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03021H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03021P
;
CREATE OR REPLACE VIEW V_A03022Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03022M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03022D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03022W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03022T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03022H 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"
,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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
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.KEY7
,A.KEY9
;
DROP VIEW V_A03022P
;
CREATE OR REPLACE VIEW V_A03023Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03023M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03023D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03023W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03023T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03023H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03023P
;
CREATE OR REPLACE VIEW V_A03024Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03024M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03024D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03024W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03024T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03024H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03024P
;
CREATE OR REPLACE VIEW V_A03025Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03025M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03025D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03025W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03025T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03025H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03025P
;
CREATE OR REPLACE VIEW V_A03026Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03026M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03026D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03026W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03026T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03026H AS SELECT
B.EX_HALFYEAR "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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY9
;
DROP VIEW V_A03026P
;
CREATE OR REPLACE VIEW V_A03027Y 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03027M 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03027D 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03027W 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
CREATE OR REPLACE VIEW V_A03027T 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"
,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"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,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"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA1 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY9
;
