CREATE OR REPLACE VIEW V_B02001Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY5
;
CREATE OR REPLACE VIEW V_B02001M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY5
;
CREATE OR REPLACE VIEW V_B02001D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY5
;
CREATE OR REPLACE VIEW V_B02001W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY5
;
CREATE OR REPLACE VIEW V_B02001T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY5
;
CREATE OR REPLACE VIEW V_B02001H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY5
;
DROP VIEW V_B02001P
;
CREATE OR REPLACE VIEW V_B02002Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02002M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02002D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02002W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02002T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02002H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY4
,A.KEY5
;
DROP VIEW V_B02002P
;
CREATE OR REPLACE VIEW V_B02003Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02003M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02003D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02003W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02003T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02003H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY5
,A.KEY10
;
DROP VIEW V_B02003P
;
CREATE OR REPLACE VIEW V_B02004Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02004M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02004D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02004W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02004T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02004H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02004P
;
CREATE OR REPLACE VIEW V_B02005Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02005M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02005D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02005W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02005T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02005H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02005P
;
CREATE OR REPLACE VIEW V_B02006Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02006M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02006D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02006W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02006T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02006H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY5
;
DROP VIEW V_B02006P
;
CREATE OR REPLACE VIEW V_B02007Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02007M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02007D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02007W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02007T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02007H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY4
,A.KEY5
,A.KEY10
;
DROP VIEW V_B02007P
;
CREATE OR REPLACE VIEW V_B02008Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02008M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02008D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02008W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02008T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02008H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02008P
;
CREATE OR REPLACE VIEW V_B02009Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02009M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02009D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02009W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02009T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02009H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02009P
;
CREATE OR REPLACE VIEW V_B02010Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02010M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02010D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02010W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02010T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY5
;
CREATE OR REPLACE VIEW V_B02010H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY4
,A.KEY5
;
DROP VIEW V_B02010P
;
CREATE OR REPLACE VIEW V_B02011Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02011M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02011D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02011W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02011T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02011H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
DROP VIEW V_B02011P
;
CREATE OR REPLACE VIEW V_B02012Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02012M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02012D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02012W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02012T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02012H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY3
,A.KEY4
,A.KEY5
,A.KEY10
;
DROP VIEW V_B02012P
;
CREATE OR REPLACE VIEW V_B02013Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02013M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02013D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02013W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02013T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02013H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,A.KEY4 "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY4
,A.KEY5
,A.KEY10
;
DROP VIEW V_B02013P
;
CREATE OR REPLACE VIEW V_B02014Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02014M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02014D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02014W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02014T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02014H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
DROP VIEW V_B02014P
;
CREATE OR REPLACE VIEW V_B02015Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02015M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02015D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02015W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02015T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02015H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
DROP VIEW V_B02015P
;
CREATE OR REPLACE VIEW V_B02016Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02016M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02016D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02016W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02016T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02016H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02016P
;
CREATE OR REPLACE VIEW V_B02017Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02017M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02017D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02017W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02017T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02017H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02017P
;
CREATE OR REPLACE VIEW V_B02018Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02018M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02018D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02018W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02018T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02018H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
DROP VIEW V_B02018P
;
CREATE OR REPLACE VIEW V_B02019Y AS SELECT
B.EX_YYYY "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02019M AS SELECT
B.EX_YYYYMM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02019D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02019W AS SELECT
B.EX_WEEK "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02019T AS SELECT
B.EX_TERM "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02019H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,MIN(A.KEY1) "VKEY1"
,MIN(A.KEY2) "VKEY2"
,A.KEY3 "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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.KEY10
;
DROP VIEW V_B02019P
;
CREATE OR REPLACE VIEW V_B02020Y AS SELECT
B.EX_YYYY "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYY
,A.KEY1
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02020M AS SELECT
B.EX_YYYYMM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMM
,A.KEY1
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02020D AS SELECT
B.EX_YYYYMMDD "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_YYYYMMDD
,A.KEY1
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02020W AS SELECT
B.EX_WEEK "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_WEEK
,A.KEY1
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02020T AS SELECT
B.EX_TERM "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_TERM
,A.KEY1
,A.KEY5
,A.KEY10
;
CREATE OR REPLACE VIEW V_B02020H AS SELECT
B.EX_HALFYEAR "VPERIOD"
,A.KEY1 "VKEY1"
,MIN(A.KEY2) "VKEY2"
,MIN(A.KEY3) "VKEY3"
,MIN(A.KEY4) "VKEY4"
,A.KEY5 "VKEY5"
,MIN(A.KEY6) "VKEY6"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,A.KEY10 "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "VD59"
,SUM(A.D60) "VD60"
FROM EX_DATA2 A
INNER JOIN EX_DAY B ON B.EX_DATE = A.DATE1
GROUP BY B.EX_HALFYEAR
,A.KEY1
,A.KEY5
,A.KEY10
;
DROP VIEW V_B02020P
;
CREATE OR REPLACE VIEW V_B02021Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02021M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02021D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02021W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02021T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02021H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
DROP VIEW V_B02021P
;
CREATE OR REPLACE VIEW V_B02022Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02022M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02022D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02022W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02022T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
CREATE OR REPLACE VIEW V_B02022H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "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.KEY10
;
DROP VIEW V_B02022P
;
CREATE OR REPLACE VIEW V_B02023Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02023M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02023D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02023W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02023T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02023H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02023P
;
CREATE OR REPLACE VIEW V_B02024Y 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02024M 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02024D 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02024W 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02024T 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
CREATE OR REPLACE VIEW V_B02024H 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"
,MIN(A.KEY7) "VKEY7"
,MIN(A.KEY8) "VKEY8"
,MIN(A.KEY9) "VKEY9"
,MIN(A.KEY10) "VKEY10"
,MIN(A.KEY11) "VKEY11"
,MIN(A.KEY12) "VKEY12"
,MIN(A.KEY13) "VKEY13"
,MIN(A.KEY14) "VKEY14"
,MIN(A.KEY15) "VKEY15"
,MIN(A.KEY16) "VKEY16"
,MIN(A.KEY17) "VKEY17"
,MIN(A.KEY18) "VKEY18"
,MIN(A.KEY19) "VKEY19"
,MIN(A.KEY20) "VKEY20"
,MIN(A.KEY21) "VKEY21"
,MIN(A.KEY22) "VKEY22"
,MIN(A.KEY23) "VKEY23"
,MIN(A.KEY24) "VKEY24"
,MIN(A.KEY25) "VKEY25"
,MIN(A.KEY26) "VKEY26"
,MIN(A.KEY27) "VKEY27"
,MIN(A.KEY28) "VKEY28"
,MIN(A.KEY29) "VKEY29"
,MIN(A.KEY30) "VKEY30"
,MIN(A.KEY31) "VKEY31"
,MIN(A.KEY32) "VKEY32"
,MIN(A.KEY33) "VKEY33"
,MIN(A.KEY34) "VKEY34"
,MIN(A.KEY35) "VKEY35"
,MIN(A.KEY36) "VKEY36"
,MIN(A.KEY37) "VKEY37"
,MIN(A.KEY38) "VKEY38"
,MIN(A.KEY39) "VKEY39"
,MIN(A.KEY40) "VKEY40"
,MIN(A.KEY41) "VKEY41"
,MIN(A.KEY42) "VKEY42"
,MIN(A.KEY43) "VKEY43"
,MIN(A.KEY44) "VKEY44"
,MIN(A.KEY45) "VKEY45"
,MIN(A.KEY46) "VKEY46"
,MIN(A.KEY47) "VKEY47"
,MIN(A.KEY48) "VKEY48"
,MIN(A.KEY49) "VKEY49"
,MIN(A.KEY50) "VKEY50"
,MIN(A.KEY51) "VKEY51"
,MIN(A.KEY52) "VKEY52"
,MIN(A.KEY53) "VKEY53"
,MIN(A.KEY54) "VKEY54"
,MIN(A.KEY55) "VKEY55"
,MIN(A.KEY56) "VKEY56"
,MIN(A.KEY57) "VKEY57"
,MIN(A.KEY58) "VKEY58"
,MIN(A.KEY59) "VKEY59"
,MIN(A.KEY60) "VKEY60"
,SUM(A.D1) "VD1"
,SUM(A.D2) "VD2"
,SUM(A.D3) "VD3"
,SUM(A.D4) "VD4"
,SUM(A.D5) "VD5"
,SUM(A.D6) "VD6"
,SUM(A.D7) "VD7"
,SUM(A.D8) "VD8"
,SUM(A.D9) "VD9"
,SUM(A.D10) "VD10"
,SUM(A.D11) "VD11"
,SUM(A.D12) "VD12"
,SUM(A.D13) "VD13"
,SUM(A.D14) "VD14"
,SUM(A.D15) "VD15"
,SUM(A.D16) "VD16"
,SUM(A.D17) "VD17"
,SUM(A.D18) "VD18"
,SUM(A.D19) "VD19"
,SUM(A.D20) "VD20"
,SUM(A.D21) "VD21"
,SUM(A.D22) "VD22"
,SUM(A.D23) "VD23"
,SUM(A.D24) "VD24"
,SUM(A.D25) "VD25"
,SUM(A.D26) "VD26"
,SUM(A.D27) "VD27"
,SUM(A.D28) "VD28"
,SUM(A.D29) "VD29"
,SUM(A.D30) "VD30"
,SUM(A.D31) "VD31"
,SUM(A.D32) "VD32"
,SUM(A.D33) "VD33"
,SUM(A.D34) "VD34"
,SUM(A.D35) "VD35"
,SUM(A.D36) "VD36"
,SUM(A.D37) "VD37"
,SUM(A.D38) "VD38"
,SUM(A.D39) "VD39"
,SUM(A.D40) "VD40"
,SUM(A.D41) "VD41"
,SUM(A.D42) "VD42"
,SUM(A.D43) "VD43"
,SUM(A.D44) "VD44"
,SUM(A.D45) "VD45"
,SUM(A.D46) "VD46"
,SUM(A.D47) "VD47"
,SUM(A.D48) "VD48"
,SUM(A.D49) "VD49"
,SUM(A.D50) "VD50"
,SUM(A.D51) "VD51"
,SUM(A.D52) "VD52"
,SUM(A.D53) "VD53"
,SUM(A.D54) "VD54"
,SUM(A.D55) "VD55"
,SUM(A.D56) "VD56"
,SUM(A.D57) "VD57"
,SUM(A.D58) "VD58"
,SUM(A.D59) "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
;
DROP VIEW V_B02024P
;
EXIT
