CREATE OR REPLACE VIEW V_B01026H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
DROP VIEW V_B01026P
;
CREATE OR REPLACE VIEW V_B01027Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01027M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01027D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01027W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01027T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01027H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
DROP VIEW V_B01027P
;
CREATE OR REPLACE VIEW V_B01028Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01028M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01028D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01028W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01028T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01028H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01028P
;
CREATE OR REPLACE VIEW V_B01029Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01029M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01029D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01029W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01029T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01029H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01029P
;
CREATE OR REPLACE VIEW V_B01030Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01030M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01030D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01030W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01030T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01030H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01030P
;
CREATE OR REPLACE VIEW V_B01031Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01031M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01031D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01031W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01031T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01031H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01031P
;
CREATE OR REPLACE VIEW V_B01032Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01032M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01032D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01032W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01032T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01032H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01032P
;
CREATE OR REPLACE VIEW V_B01033Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01033M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01033D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01033W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01033T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01033H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01033P
;
CREATE OR REPLACE VIEW V_B01034Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01034M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01034D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01034W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01034T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01034H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01034P
;
CREATE OR REPLACE VIEW V_B01035Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01035M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01035D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01035W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01035T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01035H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01035P
;
CREATE OR REPLACE VIEW V_B01036Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01036M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01036D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01036W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01036T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01036H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01036P
;
CREATE OR REPLACE VIEW V_B01037Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01037M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01037D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01037W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01037T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01037H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01037P
;
CREATE OR REPLACE VIEW V_B01038Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01038M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01038D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01038W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01038T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01038H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01038P
;
CREATE OR REPLACE VIEW V_B01039Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01039M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01039D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01039W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01039T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01039H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01039P
;
CREATE OR REPLACE VIEW V_B01040Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01040M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01040D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01040W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01040T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01040H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01040P
;
CREATE OR REPLACE VIEW V_B01041Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01041M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01041D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01041W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01041T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01041H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 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.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01041P
;
CREATE OR REPLACE VIEW V_B01042Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01042M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01042D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01042W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01042T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01042H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
DROP VIEW V_B01042P
;
CREATE OR REPLACE VIEW V_B01043Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01043M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01043D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01043W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01043T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01043H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 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.KEY8
,A.KEY9
;
DROP VIEW V_B01043P
;
CREATE OR REPLACE VIEW V_B01044Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01044M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01044D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01044W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01044T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01044H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01044P
;
CREATE OR REPLACE VIEW V_B01045Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01045M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01045D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01045W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01045T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01045H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01045P
;
CREATE OR REPLACE VIEW V_B01046Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01046M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01046D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01046W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01046T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01046H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01046P
;
CREATE OR REPLACE VIEW V_B01047Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01047M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01047D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01047W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01047T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01047H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01047P
;
CREATE OR REPLACE VIEW V_B01048Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01048M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01048D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01048W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01048T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01048H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,MIN(A.KEY5) "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY3
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01048P
;
CREATE OR REPLACE VIEW V_B01049Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01049M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01049D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01049W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01049T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01049H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY2
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01049P
;
CREATE OR REPLACE VIEW V_B01050Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01050M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01050D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01050W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01050T 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01050H 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY2
,A.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01050P
;
CREATE OR REPLACE VIEW V_B01051Y 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01051M 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01051D 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01051W 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"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,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_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY2
,A.KEY4
,A.KEY7
,A.KEY8
,A.KEY9
;
