ZSF_DS_METRIC_CALC_VIEW

Details

  • Schema: FUSION

  • Object owner: ZSF

  • Object type: VIEW

Columns

Name

METRIC_READ_FROM

IS_ADJUSTED

METRIC_CHG_ID

METRIC_CODE

METRIC_LEVEL

PERIOD_ID

DIM1_CODE

DIM1_KEY

DIM1_NAME

DIM1_PARENT_KEY

DIM1_PARENT_NAME

DIM1_ANC_PATH

DIM1_ROOT_FLAG

DIM2_CODE

DIM2_KEY

DIM2_NAME

DIM2_PARENT_KEY

DIM2_PARENT_NAME

DIM2_ANC_PATH

DIM2_ROOT_FLAG

DIM3_CODE

DIM3_KEY

DIM3_NAME

DIM3_PARENT_KEY

DIM3_PARENT_NAME

DIM3_ANC_PATH

DIM3_ROOT_FLAG

DIM4_CODE

DIM4_KEY

DIM4_NAME

DIM4_PARENT_KEY

DIM4_PARENT_NAME

DIM4_ANC_PATH

DIM4_ROOT_FLAG

DIM5_CODE

DIM5_KEY

DIM5_NAME

DIM5_PARENT_KEY

DIM5_PARENT_NAME

DIM5_ANC_PATH

DIM5_ROOT_FLAG

METRIC_SRC_PK1

METRIC_SRC_OVN1

METRIC_SRC_PK2

METRIC_SRC_OVN2

METRIC_SRC_PK3

METRIC_SRC_OVN3

METRIC_VALUE

CREATED_BY

CREATION_DATE

LAST_UPDATE_DATE

LAST_UPDATED_BY

LAST_UPDATE_LOGIN

OBJECT_VERSION_NUMBER

Query

SQL_Statement

select

'unadjusted_metric_chg_log' metric_read_from

, 0 is_adjusted

, chg.metric_src_chg_log_id metric_chg_id

, chg.metric_code metric_code

, decode(mlvl.col

, 1, 'TOTAL'

, 2, decode(

dim1.metric_dim_key

, dim1.metric_dim_parent_key

, 'OWN'

, 'SUB')) metric_level

, chg.period_id period_id

, s.metric_dim1_code dim1_code

, dim1.metric_dim_key dim1_key

, dim1.metric_dim_name dim1_name

, dim1.metric_dim_parent_key dim1_parent_key

, dim1.metric_dim_parent_name dim1_parent_name

, dim1.dim_path dim1_anc_path

, dim1.root_parent_flag dim1_root_flag

, s.metric_dim2_code dim2_code

, dim2.metric_dim_key dim2_key

, dim2.metric_dim_name dim2_name

, dim2.metric_dim_parent_key dim2_parent_key

, dim2.metric_dim_parent_name dim2_parent_name

, dim2.dim_path dim2_anc_path

, dim2.root_parent_flag dim2_root_flag

, s.metric_dim3_code dim3_code

, dim3.metric_dim_key dim3_key

, dim3.metric_dim_name dim3_name

, dim3.metric_dim_parent_key dim3_parent_key

, dim3.metric_dim_parent_name dim3_parent_name

, dim3.dim_path dim3_anc_path

, dim3.root_parent_flag dim3_root_flag

, s.metric_dim4_code dim4_code

, dim4.metric_dim_key dim4_key

, dim4.metric_dim_name dim4_name

, dim4.metric_dim_parent_key dim4_parent_key

, dim4.metric_dim_parent_name dim4_parent_name

, dim4.dim_path dim4_anc_path

, dim4.root_parent_flag dim4_root_flag

, s.metric_dim5_code dim5_code

, dim5.metric_dim_key dim5_key

, dim5.metric_dim_name dim5_name

, dim5.metric_dim_parent_key dim5_parent_key

, dim5.metric_dim_parent_name dim5_parent_name

, dim5.dim_path dim5_anc_path

, dim5.root_parent_flag dim5_root_flag

, chg.metric_src_pk1 metric_src_pk1

, chg.metric_src_ovn1 metric_src_ovn1

, chg.metric_src_pk2 metric_src_pk2

, chg.metric_src_ovn2 metric_src_ovn2

, chg.metric_src_pk3 metric_src_pk3

, chg.metric_src_ovn3 metric_src_ovn3

, chg.diff_amount metric_value

, chg.created_by created_by

, chg.creation_date creation_date

, chg.last_update_date last_update_date

, chg.last_updated_by last_updated_by

, chg.last_update_login last_update_login

, chg.object_version_number object_version_number

from

zsf_ds_metric_src_chg_log chg

, ( select 1 as col

from dual d1

where rownum = 1

union all

select 2 as col

from dual d2

where rownum = 1 ) mlvl

, zsf_ds_metric_dim_rf_dn dim1

, zsf_ds_metric_dim_rf_dn dim2

, zsf_ds_metric_dim_rf_dn dim3

, zsf_ds_metric_dim_rf_dn dim4

, zsf_ds_metric_dim_rf_dn dim5

, zsf_ds_metric_defn d

, zsf_ds_metric_src s

where 0 = 0

and d.metric_code = chg.metric_code

and s.metric_src_code = d.metric_src_code

and NVL(chg.metric_level,1) = 'NRT'

and d.status_code = 'ENABLED'

and chg.metric_dim1_key = dim1.metric_dim_key

and chg.metric_dim2_key = dim2.metric_dim_key (+)

and chg.metric_dim3_key = dim3.metric_dim_key (+)

and chg.metric_dim4_key = dim4.metric_dim_key (+)

and chg.metric_dim5_key = dim5.metric_dim_key (+)

and dim1.metric_dim_code(+) = s.metric_dim1_code

and dim2.metric_dim_code(+) = s.metric_dim2_code

and dim3.metric_dim_code(+) = s.metric_dim3_code

and dim4.metric_dim_code(+) = s.metric_dim4_code

and dim5.metric_dim_code(+) = s.metric_dim5_code

and s.metric_src_code = (SELECT param_value from zsf_ds_param where param_name='ACTIVE_METRIC_SOURCE')

union all

select

'unadjusted_metric_chg_log' metric_read_from

, 0 is_adjusted

, chg.metric_src_chg_log_id metric_chg_id

, chg.metric_code metric_code

, decode(mlvl.col

, 1, 'TOTAL'

, 2, decode(

dim1.metric_dim_key

, dim1.metric_dim_parent_key

, 'OWN'

, 'SUB')) metric_level

, chg.period_id period_id

, s.metric_dim1_code dim1_code

, dim1.metric_dim_key dim1_key

, dim1.metric_dim_name dim1_name

, dim1.metric_dim_parent_key dim1_parent_key

, dim1.metric_dim_parent_name dim1_parent_name

, dim1.dim_path dim1_anc_path

, dim1.root_parent_flag dim1_root_flag

, s.metric_dim2_code dim2_code

, dim2.metric_dim_key dim2_key

, dim2.metric_dim_name dim2_name

, dim2.metric_dim_parent_key dim2_parent_key

, dim2.metric_dim_parent_name dim2_parent_name

, dim2.dim_path dim2_anc_path

, dim2.root_parent_flag dim2_root_flag

, s.metric_dim3_code dim3_code

, dim3.metric_dim_key dim3_key

, dim3.metric_dim_name dim3_name

, dim3.metric_dim_parent_key dim3_parent_key

, dim3.metric_dim_parent_name dim3_parent_name

, dim3.dim_path dim3_anc_path

, dim3.root_parent_flag dim3_root_flag

, s.metric_dim4_code dim4_code

, dim4.metric_dim_key dim4_key

, dim4.metric_dim_name dim4_name

, dim4.metric_dim_parent_key dim4_parent_key

, dim4.metric_dim_parent_name dim4_parent_name

, dim4.dim_path dim4_anc_path

, dim4.root_parent_flag dim4_root_flag

, s.metric_dim5_code dim5_code

, dim5.metric_dim_key dim5_key

, dim5.metric_dim_name dim5_name

, dim5.metric_dim_parent_key dim5_parent_key

, dim5.metric_dim_parent_name dim5_parent_name

, dim5.dim_path dim5_anc_path

, dim5.root_parent_flag dim5_root_flag

, chg.metric_src_pk1 metric_src_pk1

, chg.metric_src_ovn1 metric_src_ovn1

, chg.metric_src_pk2 metric_src_pk2

, chg.metric_src_ovn2 metric_src_ovn2

, chg.metric_src_pk3 metric_src_pk3

, chg.metric_src_ovn3 metric_src_ovn3

, chg.diff_amount metric_value

, chg.created_by created_by

, chg.creation_date creation_date

, chg.last_update_date last_update_date

, chg.last_updated_by last_updated_by

, chg.last_update_login last_update_login

, chg.object_version_number object_version_number

from

zsf_ds_metric_src_chg_log chg

, ( select 1 as col

from dual d1

where rownum = 1

union all

select 2 as col

from dual d2

where rownum = 1 ) mlvl

, zsf_ds_met_dim_rf_dn_stg dim1

, zsf_ds_met_dim_rf_dn_stg dim2

, zsf_ds_met_dim_rf_dn_stg dim3

, zsf_ds_met_dim_rf_dn_stg dim4

, zsf_ds_met_dim_rf_dn_stg dim5

, zsf_ds_metric_defn d

, zsf_ds_metric_src s

where 0 = 0

and d.metric_code = chg.metric_code

and s.metric_src_code = d.metric_src_code

and chg.metric_level = 'DEL'

and dim1.dim_data_set(+) = 'OLD'

and dim2.dim_data_set(+) = 'OLD'

and dim3.dim_data_set(+) = 'OLD'

and dim4.dim_data_set(+) = 'OLD'

and dim5.dim_data_set(+) = 'OLD'

and chg.metric_dim1_key = dim1.metric_dim_key

and chg.metric_dim2_key = dim2.metric_dim_key (+)

and chg.metric_dim3_key = dim3.metric_dim_key (+)

and chg.metric_dim4_key = dim4.metric_dim_key (+)

and chg.metric_dim5_key = dim5.metric_dim_key (+)

and NVL(dim1.metric_dim_key,1) = NVL(dim1.metric_dim_parent_key,1)

and NVL(dim2.metric_dim_key,1) = NVL(dim2.metric_dim_parent_key,1)

and NVL(dim3.metric_dim_key,1) = NVL(dim3.metric_dim_parent_key,1)

and NVL(dim4.metric_dim_key,1) = NVL(dim4.metric_dim_parent_key,1)

and NVL(dim5.metric_dim_key,1) = NVL(dim5.metric_dim_parent_key,1)

and dim1.metric_dim_code(+) = s.metric_dim1_code

and dim2.metric_dim_code(+) = s.metric_dim2_code

and dim3.metric_dim_code(+) = s.metric_dim3_code

and dim4.metric_dim_code(+) = s.metric_dim4_code

and dim5.metric_dim_code(+) = s.metric_dim5_code

and s.metric_src_code = (SELECT param_value from zsf_ds_param

where param_name='ACTIVE_METRIC_SOURCE')

union all

select

'unadjusted_metric_src' metric_read_from

, 0 is_adjusted

, calc.metric_calc_id metric_chg_id

, calc.metric_code metric_code

, decode(mlvl.col

, 1, 'TOTAL'

, 2, decode(

calc.dim1_key

, calc.dim1_parent_key

, 'OWN'

, 'SUB')) metric_level

, calc.period_id period_id

, s.metric_dim1_code dim1_code

, calc.dim1_key dim1_key

, dim1.metric_dim_name dim1_name

, calc.dim1_parent_key dim1_parent_key

, dim1.metric_dim_parent_name dim1_parent_name

, calc.dim1_anc_path dim1_anc_path

, calc.dim1_root_flag dim1_root_flag

, s.metric_dim2_code dim2_code

, calc.dim2_key dim2_key

, dim2.metric_dim_name dim2_name

, calc.dim2_parent_key dim2_parent_key

, dim2.metric_dim_parent_name dim2_parent_name

, calc.dim2_anc_path dim2_anc_path

, calc.dim2_root_flag dim2_root_flag

, s.metric_dim3_code dim3_code

, calc.dim3_key dim3_key

, dim3.metric_dim_name dim3_name

, calc.dim3_parent_key dim3_parent_key

, dim3.metric_dim_parent_name dim3_parent_name

, calc.dim3_anc_path dim3_anc_path

, calc.dim3_root_flag dim3_root_flag

, s.metric_dim4_code dim4_code

, calc.dim4_key dim4_key

, dim4.metric_dim_name dim4_name

, calc.dim4_parent_key dim4_parent_key

, dim4.metric_dim_parent_name dim4_parent_name

, calc.dim4_anc_path dim4_anc_path

, calc.dim4_root_flag dim4_root_flag

, s.metric_dim5_code dim5_code

, calc.dim5_key dim5_key

, dim5.metric_dim_name dim5_name

, calc.dim5_parent_key dim5_parent_key

, dim5.metric_dim_parent_name dim5_parent_name

, calc.dim5_anc_path dim5_anc_path

, calc.dim5_root_flag dim5_root_flag

, calc.metric_src_pk1 metric_src_pk1

, calc.metric_src_ovn1 metric_src_ovn1

, calc.metric_src_pk2 metric_src_pk2

, calc.metric_src_ovn2 metric_src_ovn2

, calc.metric_src_pk3 metric_src_pk3

, calc.metric_src_ovn3 metric_src_ovn3

, calc.metric_value metric_value

, calc.created_by created_by

, calc.creation_date creation_date

, calc.last_update_date last_update_date

, calc.last_updated_by last_updated_by

, calc.last_update_login last_update_login

, calc.object_version_number object_version_number

from

zsf_ds_metric_calc calc

, ( select 1 as col

from dual d1

where rownum = 1

union all

select 2 as col

from dual d2

where rownum = 1 ) mlvl

, zsf_ds_metric_dim_rf_dn dim1

, zsf_ds_metric_dim_rf_dn dim2

, zsf_ds_metric_dim_rf_dn dim3

, zsf_ds_metric_dim_rf_dn dim4

, zsf_ds_metric_dim_rf_dn dim5

, zsf_ds_metric_defn d

, zsf_ds_metric_src s

where 0 = 0

and d.metric_code = calc.metric_code

and s.metric_src_code = d.metric_src_code

and d.status_code = 'ENABLED'

and calc.dim1_key = dim1.metric_dim_key

and calc.dim2_key = dim2.metric_dim_key (+)

and calc.dim3_key = dim3.metric_dim_key (+)

and calc.dim4_key = dim4.metric_dim_key (+)

and calc.dim5_key = dim5.metric_dim_key (+)

and calc.dim1_parent_key = dim1.metric_dim_parent_key

and calc.dim2_parent_key = dim2.metric_dim_parent_key (+)

and calc.dim3_parent_key = dim3.metric_dim_parent_key (+)

and calc.dim4_parent_key = dim4.metric_dim_parent_key (+)

and calc.dim5_parent_key = dim5.metric_dim_parent_key (+)

and s.metric_src_code = (SELECT param_value from zsf_ds_param where param_name='ACTIVE_METRIC_SOURCE')