次のように4つのテーブルがあります。
1. wmu_kpi_cateogries: ( KPI カテゴリを含むテーブル)
- カテゴリ ID
- カテゴリ_タイトル
- 有効です
データ: 5 つの KPI カテゴリを含む
2. wmu_kpi_subcategories: ( KPI サブカテゴリを含むテーブル)
- Subcategory_id
- Subcategory_title
- カテゴリ ID
- 有効です
データ: category_id 1、2、および 3 の KPI カテゴリの 4 つの KPI サブカテゴリが含まれています。4 と 5 の KPI カテゴリには、それぞれ 3 つと 6 つのサブカテゴリがあります。
3. wmu_designations (社内呼称表)
- 指定番号
- 指定タイトル
- section_id
データ: 10 件の指定を含む
4. wmu_designation_to_kpis (各指定に KPI 値を適用するときに入力されるテーブル)
- empkpi_id
- 指定番号
- カテゴリ ID
- subcategory_id
- ターゲット値
データ: kpi cateogires と sub-categories の値をそれぞれの指定に割り当てながら、フォームが入力するテーブル。
指定タイトルごとに各カテゴリとサブカテゴリの名前とその値を表示できる単一のクエリを作成するにはどうすればよいですか?
各テーブルのサンプル データ
"category_id" "category_title" "category_description" "isvalid" "category_year" "1" "Financial" "" "1" "2013" "2" "Growth" "" "1" "2013" "3" "Risk" " " "1" "2013" "4" "サービス品質"" "1" "2013" "5" "人" "" "1" "2013"
"subcategory_id" "subcategory_title" "subcategory_description" "category_id" "isvalid" "1" "AM: Up Front Fees (SR)" "0" "1" "1" "2" "AM: Up Front Fees Team Target Achievement" "0" "1" "1" "3" "仲介: 正味手数料貢献 (RC ターゲットの 50%) (%)" "0" "1" "1" "4" "仲介: 正味手数料貢献 チーム目標達成" "0" "1" "1" "5" "IB: 運用報酬への貢献度 (%)" "0" "1" "1" "6" "AM: 純売上高比率 (SR) = 申し込み/償還" " 0" "2" "1" "7""AM: 成約した取引数 (#)= 新規サブスクリプションの数" "0" "2" "1" "8" "仲介: クライアント ベースの増分: 新規クライアント + 再アクティブ化されたクライアント (#)" "0" "2" "1 " "9" "AM + Brokerage: New HNW Clients Retention # of New HNW Clients (Balance >2M) / # # of Lost/#HNW Clients (Balance=0)" "0" "2" "1" "10" " AM + 仲介: RB 貢献: 成功取引 / RB との共同訪問の数" "0" "2" "1" "11" 20-100 M (地域ごとに半年ごと) 2-20 M (地域ごとに半年ごと) で 5 合計 = 地域ごとに 18、全体で 54" "0" "2" "1" "12""コンプライアンス違反 (#)" "0" "3" "1" "13" "高リスクの期限切れの監査例外 (#)" "0" "3" "1" "14" "投資センターに関する優先度の高い品質コメント(#)" "0" "4" "1" "15" "WM 関連の苦情の削減 (%)" "0" "4" "1" "16" "HNW クライアントの通話レポート (残高 >=2 M ) (#) クライアントへの 2 回の訪問 +100 M (IA/IO ごとに年間) クライアントへの 2 回の訪問 20-100 M (IA/IO ごとに年間) クライアントへの 1 回の訪問 2-20 M (IA/IO ごとに年間)" " 0" "4" "1" "17" "異なるクライアントへの訪問回数 (IA/IO ごとに 1 日 2 回)" "0" "4" "1" "18""HNW クライアントの数 (残高 >=2 M) / IA/IO の数" "0" "5" "1" "19" "IA および IO スタッフの数 / 投資センターの数" "0" "5" "0" "20" "センター マネージャー、CSO、ブローカー スタッフの数 / 投資センターの数" "0" "5" "1" "21" "地域/エリアごとのスタッフ ミーティング 2 毎年 (#)" "0 " "5" "1" "22" "異なる IA/IO との共同訪問 (週 3 回) (#)" "0" "5" "1" "23" "異なるセンターへの訪問 (週 3 回) ( #)" "0" "5" "1" "24" "計画に対するトレーニング (%)" "0" "5" "1" "25"「リーダーシップ・コンピテンシー (#)」「0」「5」「1」
"designation_id" "designation_title" "designation_description" "section_id" "isvalid" "issales" "1" "Wealth Management Head" "" "1" "1" "1" "2" "Advisory Head" "" "1" " 1" "1" "3" "アドバイザリー リージョナル マネージャー"" "1" "1" "1" "4" "IA/IO" "" "1" "1" "1" "5" "センター長" "" "1" "1" "1" "6" "センター地域マネージャー" "" "1" "1" "1" "7" "センターマネージャー"" "1" "1""1" "8" "CSO" "" "1" "1" "1" "9" "ブローカー" "" "1" "1" "1"
"empkpi_id" "type_id" "employee_id" "designation_id" "category_id" "subcategory_id" "target_value" "kpi_year" "1" "1" "0" "1" "1" "0" "25" "2013" "2 " "1" "0" "1" "1" "0" "50" "2013" "3" "1" "0" "1" "1" "0" "0" "2013" "4" " 1" "0" "1" "1" "0" "40" "2013" "5" "1" "0" "1" "1" "0" "0" "2013" "6" "1" 「0」「1」「1」"0" "10" "2013" "7" "1" "0" "1" "0" "0" "0" "2013" "8" "1" "0" "1" "0" "0 " "0" "2013" "9" "1" "0" "1" "2" "0" "25" "2013" "10" "1" "0" "1" "2" "0" " 20" "2013" "11" "1" "0" "1" "2" "0" "20" "2013" "12" "1" "0" "1" "2" "0" "20" 「2013」「13」「1」「0」「1」「2」「0」"20" "2013" "14" "1" "0" "1" "2" "0" "20" "2013" "15" "1" "0" "1" "2" "0" "0 " "2013" "16" "1" "0" "1" "0" "0" "0" "2013" "17" "1" "0" "1" "0" "0" "0" " 2013" "18" "1" "0" "1" "3" "0" "15" "2013" "19" "1" "0" "1" "3" "0" "50" "2013" "20" "1" "0" "1" "3" "0" "50" "2013" "21" "1" "0" "1" "0" "0" "0" "2013" "22" "1" "0" "1" "0" "0" "0" "2013" "23" "1" "0" "1" "4" "0" "20" "2013" "24" "1" "0" "1" "4" "0" "50" "2013 " "25" "1" "0" "1" "4" "0" "50" "2013" "26" "1" "0" "1" "4" "0" "0" "2013" " 27" "1" "0" "1" "4" "0" "0""2013" "28" "1" "0" "1" "0" "0" "0" "2013" "29" "1" "0" "1" "0" "0" "0" "2013 " "30" "1" "0" "1" "5" "0" "15" "2013" "31" "1" "0" "1" "5" "0" "20" "2013" " 32" "1" "0" "1" "5" "0" "20" "2013" "33" "1" "0" "1" "5" "0" "20" "2013" "34" "1" "0" "1" "5" "0" "0" "2013" "35" "1" "0" "1" "5" "0" "0" "2013" "36" "1" "0" "1" "5" "0" "0" "2013" "37" "1" "0" "1" "5" "0" "20" "2013" "38" "1" "0" "1" "5" "0" "20" "2013" "39 " "1" "0" "1" "0" "0" "0" "2013" "40" "1" "0" "1" "0" "0" "0" "2013""36" "1" "0" "1" "5" "0" "0" "2013" "37" "1" "0" "1" "5" "0" "20" "2013" "38 " "1" "0" "1" "5" "0" "20" "2013" "39" "1" "0" "1" "0" "0" "0" "2013" "40" " 1" "0" "1" "0" "0" "0" "2013""36" "1" "0" "1" "5" "0" "0" "2013" "37" "1" "0" "1" "5" "0" "20" "2013" "38 " "1" "0" "1" "5" "0" "20" "2013" "39" "1" "0" "1" "0" "0" "0" "2013" "40" " 1" "0" "1" "0" "0" "0" "2013""1" "0" "1" "5" "0" "20" "2013" "39" "1" "0" "1" "0" "0" "0" "2013" "40" "1 " "0" "1" "0" "0" "0" "2013""1" "0" "1" "5" "0" "20" "2013" "39" "1" "0" "1" "0" "0" "0" "2013" "40" "1 " "0" "1" "0" "0" "0" "2013"