CREATE OR REPLACE VIEW V_B01051T 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_B01051H 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_B01051P
;
CREATE OR REPLACE VIEW V_B01052Y 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_B01052M 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_B01052D 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_B01052W 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_B01052T 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_B01052H 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_B01052P
;
CREATE OR REPLACE VIEW V_B01053Y 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01053M 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01053D 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01053W 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01053T 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01053H 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_B01053P
;
CREATE OR REPLACE VIEW V_B01054Y 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_B01054M 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_B01054D 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_B01054W 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_B01054T 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_B01054H 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_B01054P
;
CREATE OR REPLACE VIEW V_B01055Y 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_B01055M 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_B01055D 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_B01055W 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_B01055T 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_B01055H 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_B01055P
;
CREATE OR REPLACE VIEW V_B01056Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01056M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01056D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01056W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01056T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01056H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01056P
;
CREATE OR REPLACE VIEW V_B01057Y 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_B01057M 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_B01057D 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_B01057W 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_B01057T 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_B01057H 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_B01057P
;
CREATE OR REPLACE VIEW V_B01058Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01058M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01058D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01058W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01058T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01058H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01058P
;
CREATE OR REPLACE VIEW V_B01059Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01059M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01059D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01059W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01059T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01059H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01059P
;
CREATE OR REPLACE VIEW V_B01060Y 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_B01060M 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_B01060D 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_B01060W 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_B01060T 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_B01060H 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_B01060P
;
CREATE OR REPLACE VIEW V_B01061Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01061M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01061D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01061W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01061T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01061H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,A.KEY2 "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01061P
;
CREATE OR REPLACE VIEW V_B01062Y 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_B01062M 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_B01062D 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_B01062W 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_B01062T 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_B01062H 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_B01062P
;
CREATE OR REPLACE VIEW V_B01063Y 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01063M 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01063D 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01063W 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01063T 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01063H 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
DROP VIEW V_B01063P
;
CREATE OR REPLACE VIEW V_B01064Y 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01064M 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01064D 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01064W 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01064T 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
CREATE OR REPLACE VIEW V_B01064H 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"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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
;
DROP VIEW V_B01064P
;
CREATE OR REPLACE VIEW V_B01065Y 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_B01065M 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_B01065D 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_B01065W 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_B01065T 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_B01065H 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_B01065P
;
CREATE OR REPLACE VIEW V_B01066Y 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_B01066M 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_B01066D 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_B01066W 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_B01066T 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_B01066H 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_B01066P
;
CREATE OR REPLACE VIEW V_B01067Y 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_B01067M 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_B01067D 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_B01067W 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_B01067T 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_B01067H 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_B01067P
;
CREATE OR REPLACE VIEW V_B01068Y 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_B01068M 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_B01068D 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_B01068W 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_B01068T 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_B01068H 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_B01068P
;
CREATE OR REPLACE VIEW V_B01069Y 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_B01069M 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_B01069D 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_B01069W 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_B01069T 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_B01069H 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_B01069P
;
CREATE OR REPLACE VIEW V_B01070Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01070M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01070D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01070W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01070T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01070H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01070P
;
CREATE OR REPLACE VIEW V_B01071Y 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_B01071M 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_B01071D 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_B01071W 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_B01071T 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_B01071H 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_B01071P
;
CREATE OR REPLACE VIEW V_B01072Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01072M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01072D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01072W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01072T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01072H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
DROP VIEW V_B01072P
;
CREATE OR REPLACE VIEW V_B01073Y 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_B01073M 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_B01073D 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_B01073W 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_B01073T 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_B01073H 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_B01073P
;
CREATE OR REPLACE VIEW V_B01074Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01074M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01074D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01074W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01074T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
CREATE OR REPLACE VIEW V_B01074H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
;
DROP VIEW V_B01074P
;
CREATE OR REPLACE VIEW V_B01075Y 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_B01075M 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_B01075D 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_B01075W 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_B01075T 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_B01075H 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_B01075P
;
CREATE OR REPLACE VIEW V_B01076Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01076M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
CREATE OR REPLACE VIEW V_B01076D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,A.KEY7 "VKEY7"
,A.KEY8 "VKEY8"
,A.KEY9 "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.KEY5
,A.KEY7
,A.KEY8
,A.KEY9
,A.KEY10
;
