Determinents on Customer Conformed Dimension

Determinents on Customer Conformed Dimension

<p>Determinents on Customer Conformed Dimension</p><p>Company Customer Group Fact Dimension IBM Cognos SQl with D as (select CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC as CUSTOMER_GROUP_ENG_DESC, COMPANY_DIM_MV.COMPANY_ID as COMPANY_ID, COA_PART_A_DIM_MV.ACCOUNT_GROUP as ACCOUNT_GROUP, XSUM(PLAN_BUDGET_FACT_MV.AMOUNT for CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC,COMPANY_DI M_MV.COMPANY_ID,COA_PART_A_DIM_MV.ACCOUNT_GROUP ) as AMOUNT, XSUM(XSUM(PLAN_BUDGET_FACT_MV.AMOUNT for CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC,COMPANY_DI M_MV.COMPANY_ID,COA_PART_A_DIM_MV.ACCOUNT_GROUP ) at CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC,COMPANY_DI M_MV.COMPANY_ID,COA_PART_A_DIM_MV.ACCOUNT_GROUP ) as AMOUNT5 from ( "IFS Data Mart"..IFSINFO.FISCAL_PERIOD_YEAR_DIM_MV FISCAL_PERIOD_YEAR_DIM_MV join "IFS Data Mart"..IFSINFO.PLAN_BUDGET_FACT_MV PLAN_BUDGET_FACT_MV on (FISCAL_PERIOD_YEAR_DIM_MV.FISCAL_PERIOD_YEAR_DIM_ID = PLAN_BUDGET_FACT_MV.FISCAL_PERIOD_YEAR_DIM_ID) join "IFS Data Mart"..IFSINFO.COA_PART_A_DIM_MV COA_PART_A_DIM_MV on (COA_PART_A_DIM_MV.COA_PART_A_DIM_ID = PLAN_BUDGET_FACT_MV.COA_PART_A_DIM_ID) join "IFS Data Mart"..IFSINFO.COMPANY_DIM_MV COMPANY_DIM_MV on (COMPANY_DIM_MV.COMPANY_DIM_ID = PLAN_BUDGET_FACT_MV.COMPANY_DIM_ID) ) left outer join ( "IFS Data Mart"..IFSINFO.COMPANY_CUSTOMER_GROUP_FACT_MV COMPANY_CUSTOMER_GROUP_FACT_MV join "IFS Data Mart"..IFSINFO.CUSTOMER_GROUP_DIM_MV CUSTOMER_GROUP_DIM_MV on (COMPANY_CUSTOMER_GROUP_FACT_MV.CUSTOMER_GROUP_DIM_ID = CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_DIM_ID) ) on ((COMPANY_CUSTOMER_GROUP_FACT_MV.COMPANY_DIM_ID = PLAN_BUDGET_FACT_MV.COMPANY_DIM_ID) and (COMPANY_CUSTOMER_GROUP_FACT_MV.CUSTOMER_DIM_ID = PLAN_BUDGET_FACT_MV.CUSTOMER_DIM_ID)) where (FISCAL_PERIOD_YEAR_DIM_MV.FISCAL_YEAR between 2012 and 2012) and (COA_PART_A_DIM_MV.ACCOUNT_GROUP in ('4010','512B','8210')) and (COMPANY_DIM_MV.COMPANY_ID in ('BRPI','ERIE','LPLP')) group by CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC, COMPANY_DIM_MV.COMPANY_ID, COA_PART_A_DIM_MV.ACCOUNT_GROUP ), D3 as (select CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC as CUSTOMER_GROUP_ENG_DESC, COMPANY_DIM_MV.COMPANY_ID as COMPANY_ID, COA_PART_A_DIM_MV.ACCOUNT_GROUP as ACCOUNT_GROUP, XSUM(ACTUAL_GL_TRANS_FACT_MV.AMOUNT for CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC,COMPANY_DI M_MV.COMPANY_ID,COA_PART_A_DIM_MV.ACCOUNT_GROUP ) as AMOUNT2, XSUM(XSUM(ACTUAL_GL_TRANS_FACT_MV.AMOUNT for CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC,COMPANY_DI M_MV.COMPANY_ID,COA_PART_A_DIM_MV.ACCOUNT_GROUP ) at CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC,COMPANY_DI M_MV.COMPANY_ID,COA_PART_A_DIM_MV.ACCOUNT_GROUP ) as AMOUNT25 from ( "IFS Data Mart"..IFSINFO.FISCAL_PERIOD_YEAR_DIM_MV FISCAL_PERIOD_YEAR_DIM_MV join "IFS Data Mart"..IFSINFO.ACTUAL_GL_TRANS_FACT_MV ACTUAL_GL_TRANS_FACT_MV on (FISCAL_PERIOD_YEAR_DIM_MV.FISCAL_PERIOD_YEAR_DIM_ID = ACTUAL_GL_TRANS_FACT_MV.FISCAL_PERIOD_YEAR_DIM_ID) join "IFS Data Mart"..IFSINFO.COA_PART_A_DIM_MV COA_PART_A_DIM_MV on (COA_PART_A_DIM_MV.COA_PART_A_DIM_ID = ACTUAL_GL_TRANS_FACT_MV.COA_PART_A_DIM_ID) join "IFS Data Mart"..IFSINFO.COMPANY_DIM_MV COMPANY_DIM_MV on (COMPANY_DIM_MV.COMPANY_DIM_ID = ACTUAL_GL_TRANS_FACT_MV.COMPANY_DIM_ID) ) left outer join ( "IFS Data Mart"..IFSINFO.COMPANY_CUSTOMER_GROUP_FACT_MV COMPANY_CUSTOMER_GROUP_FACT_MV join "IFS Data Mart"..IFSINFO.CUSTOMER_GROUP_DIM_MV CUSTOMER_GROUP_DIM_MV on (COMPANY_CUSTOMER_GROUP_FACT_MV.CUSTOMER_GROUP_DIM_ID = CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_DIM_ID) ) on ((COMPANY_CUSTOMER_GROUP_FACT_MV.COMPANY_DIM_ID = ACTUAL_GL_TRANS_FACT_MV.COMPANY_DIM_ID) and (COMPANY_CUSTOMER_GROUP_FACT_MV.CUSTOMER_DIM_ID = ACTUAL_GL_TRANS_FACT_MV.CUSTOMER_DIM_ID)) where (FISCAL_PERIOD_YEAR_DIM_MV.FISCAL_YEAR between 2012 and 2012) and (COA_PART_A_DIM_MV.ACCOUNT_GROUP in ('4010','512B','8210')) and (COMPANY_DIM_MV.COMPANY_ID in ('BRPI','ERIE','LPLP')) group by CUSTOMER_GROUP_DIM_MV.CUSTOMER_GROUP_ENG_DESC, COMPANY_DIM_MV.COMPANY_ID, COA_PART_A_DIM_MV.ACCOUNT_GROUP ) select coalesce(D.CUSTOMER_GROUP_ENG_DESC,D3.CUSTOMER_GROUP_ENG_DES C) as CUSTOMER_GROUP_ENG_DESC, coalesce(D.COMPANY_ID,D3.COMPANY_ID) as COMPANY_ID, coalesce(D.ACCOUNT_GROUP,D3.ACCOUNT_GROUP) as ACCOUNT_GROUP, D.AMOUNT as AMOUNT, D3.AMOUNT2 as AMOUNT2, XMIN(D.AMOUNT5 ) as AMOUNT6, XMIN(D3.AMOUNT25 ) as AMOUNT27 from D full outer join D3 on (((D.CUSTOMER_GROUP_ENG_DESC = D3.CUSTOMER_GROUP_ENG_DESC) and (D.COMPANY_ID = D3.COMPANY_ID)) and (D.ACCOUNT_GROUP = D3.ACCOUNT_GROUP)) order by COMPANY_ID asc</p><p>NATIVE SQL with "D" as ( select "T0"."C0" "CUSTOMER_GROUP_ENG_DESC", "T0"."C1" "COMPANY_ID", "T0"."C2" "ACCOUNT_GROUP", "T0"."C3" "AMOUNT", sum("T0"."C3") over () "AMOUNT5" from ( select "CUSTOMER_GROUP_DIM_MV"."CUSTOMER_GROUP_ENG_DESC" "C0", "COMPANY_DIM_MV"."COMPANY_ID" "C1", "COA_PART_A_DIM_MV"."ACCOUNT_GROUP" "C2", sum("PLAN_BUDGET_FACT_MV"."AMOUNT") "C3" from ((("IFSINFO"."FISCAL_PERIOD_YEAR_DIM_MV" "FISCAL_PERIOD_YEAR_DIM_MV" INNER JOIN "IFSINFO"."PLAN_BUDGET_FACT_MV" "PLAN_BUDGET_FACT_MV" on "FISCAL_PERIOD_YEAR_DIM_MV"."FISCAL_PERIOD_YEAR_DIM_ID"="P LAN_BUDGET_FACT_MV"."FISCAL_PERIOD_YEAR_DIM_ID") INNER JOIN "IFSINFO"."COA_PART_A_DIM_MV" "COA_PART_A_DIM_MV" on "COA_PART_A_DIM_MV"."COA_PART_A_DIM_ID"="PLAN_BUDGET_FAC T_MV"."COA_PART_A_DIM_ID") INNER JOIN "IFSINFO"."COMPANY_DIM_MV" "COMPANY_DIM_MV" on "COMPANY_DIM_MV"."COMPANY_DIM_ID"="PLAN_BUDGET_FACT_MV "."COMPANY_DIM_ID") LEFT OUTER JOIN ("IFSINFO"."COMPANY_CUSTOMER_GROUP_FACT_MV" "COMPANY_CUSTOMER_GROUP_FACT_MV" INNER JOIN "IFSINFO"."CUSTOMER_GROUP_DIM_MV" "CUSTOMER_GROUP_DIM_MV" on "COMPANY_CUSTOMER_GROUP_FACT_MV"."CUSTOMER_GROUP_DIM_ ID"="CUSTOMER_GROUP_DIM_MV"."CUSTOMER_GROUP_DIM_ID") on "PLAN_BUDGET_FACT_MV"."COMPANY_DIM_ID"="COMPANY_CUSTOM ER_GROUP_FACT_MV"."COMPANY_DIM_ID" and "PLAN_BUDGET_FACT_MV"."CUSTOMER_DIM_ID"="COMPANY_CUSTO MER_GROUP_FACT_MV"."CUSTOMER_DIM_ID" where "FISCAL_PERIOD_YEAR_DIM_MV"."FISCAL_YEAR" between 2012 and 2012 and "COA_PART_A_DIM_MV"."ACCOUNT_GROUP" in ('4010', '512B', '8210') and "COMPANY_DIM_MV"."COMPANY_ID" in ('BRPI', 'ERIE', 'LPLP') group by "CUSTOMER_GROUP_DIM_MV"."CUSTOMER_GROUP_ENG_DESC", "COMPANY_DIM_MV"."COMPANY_ID", "COA_PART_A_DIM_MV"."ACCOUNT_GROUP") "T0"), "D3" as ( select "T0"."C0" "CUSTOMER_GROUP_ENG_DESC", "T0"."C1" "COMPANY_ID", "T0"."C2" "ACCOUNT_GROUP", "T0"."C3" "AMOUNT2", sum("T0"."C3") over () "AMOUNT25" from ( select "CUSTOMER_GROUP_DIM_MV"."CUSTOMER_GROUP_ENG_DESC" "C0", "COMPANY_DIM_MV"."COMPANY_ID" "C1", "COA_PART_A_DIM_MV"."ACCOUNT_GROUP" "C2", sum("ACTUAL_GL_TRANS_FACT_MV"."AMOUNT") "C3" from ((("IFSINFO"."FISCAL_PERIOD_YEAR_DIM_MV" "FISCAL_PERIOD_YEAR_DIM_MV" INNER JOIN "IFSINFO"."ACTUAL_GL_TRANS_FACT_MV" "ACTUAL_GL_TRANS_FACT_MV" on "FISCAL_PERIOD_YEAR_DIM_MV"."FISCAL_PERIOD_YEAR_DIM_ID"="A CTUAL_GL_TRANS_FACT_MV"."FISCAL_PERIOD_YEAR_DIM_ID") INNER JOIN "IFSINFO"."COA_PART_A_DIM_MV" "COA_PART_A_DIM_MV" on "COA_PART_A_DIM_MV"."COA_PART_A_DIM_ID"="ACTUAL_GL_TRANS _FACT_MV"."COA_PART_A_DIM_ID") INNER JOIN "IFSINFO"."COMPANY_DIM_MV" "COMPANY_DIM_MV" on "COMPANY_DIM_MV"."COMPANY_DIM_ID"="ACTUAL_GL_TRANS_FAC T_MV"."COMPANY_DIM_ID") LEFT OUTER JOIN ("IFSINFO"."COMPANY_CUSTOMER_GROUP_FACT_MV" "COMPANY_CUSTOMER_GROUP_FACT_MV" INNER JOIN "IFSINFO"."CUSTOMER_GROUP_DIM_MV" "CUSTOMER_GROUP_DIM_MV" on "COMPANY_CUSTOMER_GROUP_FACT_MV"."CUSTOMER_GROUP_DIM_ ID"="CUSTOMER_GROUP_DIM_MV"."CUSTOMER_GROUP_DIM_ID") on "ACTUAL_GL_TRANS_FACT_MV"."COMPANY_DIM_ID"="COMPANY_CU STOMER_GROUP_FACT_MV"."COMPANY_DIM_ID" and "ACTUAL_GL_TRANS_FACT_MV"."CUSTOMER_DIM_ID"="COMPANY_C USTOMER_GROUP_FACT_MV"."CUSTOMER_DIM_ID" where "FISCAL_PERIOD_YEAR_DIM_MV"."FISCAL_YEAR" between 2012 and 2012 and "COA_PART_A_DIM_MV"."ACCOUNT_GROUP" in ('4010', '512B', '8210') and "COMPANY_DIM_MV"."COMPANY_ID" in ('BRPI', 'ERIE', 'LPLP') group by "CUSTOMER_GROUP_DIM_MV"."CUSTOMER_GROUP_ENG_DESC", "COMPANY_DIM_MV"."COMPANY_ID", "COA_PART_A_DIM_MV"."ACCOUNT_GROUP") "T0") select (coalesce("D"."CUSTOMER_GROUP_ENG_DESC", "D3"."CUSTOMER_GROUP_ENG_DESC")) "CUSTOMER_GROUP_ENG_DESC", (coalesce("D"."COMPANY_ID", "D3"."COMPANY_ID")) "COMPANY_ID", (coalesce("D"."ACCOUNT_GROUP", "D3"."ACCOUNT_GROUP")) "ACCOUNT_GROUP", "D"."AMOUNT" "AMOUNT", "D3"."AMOUNT2" "AMOUNT2", min("D"."AMOUNT5") over () "AMOUNT6", min("D3"."AMOUNT25") over () "AMOUNT27" from "D" FULL OUTER JOIN "D3" on "D"."CUSTOMER_GROUP_ENG_DESC"="D3"."CUSTOMER_GROUP_ENG_ DESC" and "D"."COMPANY_ID"="D3"."COMPANY_ID" and "D"."ACCOUNT_GROUP"="D3"."ACCOUNT_GROUP" order by "COMPANY_ID" asc nulls last</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us