FSN#33170 KPI. zo werkt het ongeveer wel
svn path=/Database/trunk/; revision=27164
This commit is contained in:
@@ -339,9 +339,25 @@ AS
|
||||
|
||||
-- Details score.
|
||||
CREATE_VIEW(kpi_v_cat1_cat2_detail,0)
|
||||
(
|
||||
fclt_key,
|
||||
locatie,
|
||||
alg_locatie_key,
|
||||
kpi_score_datum,
|
||||
kpi_definitie_categorie1,
|
||||
kpi_definitie_categorie2,
|
||||
kpi_code,
|
||||
kpi_omschrijving,
|
||||
kpi_uitleg,
|
||||
score,
|
||||
kleur,
|
||||
totaalscore,
|
||||
totaalkleur
|
||||
)
|
||||
AS
|
||||
SELECT -1 fclt_key,
|
||||
lcl.l('lcl_all') locatie,
|
||||
SELECT -1 fclt_key,
|
||||
lcl.l ('lcl_all') locatie,
|
||||
-1 alg_locatie_key,
|
||||
po.kpi_score_datum,
|
||||
po.kpi_definitie_categorie1,
|
||||
po.kpi_definitie_categorie2,
|
||||
@@ -358,7 +374,8 @@ AS
|
||||
ROUND (AVG (ks.score), 1) score,
|
||||
kpi.getkleurnorm (AVG (ks.score)) kleur
|
||||
FROM kpi_v_kpi_scores ks
|
||||
GROUP BY ks.kpi_score_datum, ks.kpi_definitie_categorie1, ks.kpi_definitie_categorie2) po
|
||||
GROUP BY ks.kpi_score_datum, ks.kpi_definitie_categorie1, ks.kpi_definitie_categorie2)
|
||||
po
|
||||
LEFT OUTER JOIN
|
||||
( SELECT ks.kpi_score_datum,
|
||||
ks.kpi_definitie_categorie1,
|
||||
@@ -381,6 +398,7 @@ AS
|
||||
UNION ALL
|
||||
SELECT po.alg_locatie_key fclt_key,
|
||||
po.locatie,
|
||||
po.alg_locatie_key,
|
||||
po.kpi_score_datum,
|
||||
po.kpi_definitie_categorie1,
|
||||
po.kpi_definitie_categorie2,
|
||||
|
||||
Reference in New Issue
Block a user