1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| select
c.nom_unite,
b.nom_step,
avg(a.volume_mj_entree),
avg(a.volume_mj_sortie),
avg(a.mes_entree),
avg(a.mes_sortie),
avg(a.dbo5_entree),
avg(a.dbo5_sortie),
avg(a.dco_entree),
avg(a.dco_sortie),
avg(a.nh4_entree),
avg(a.nh4_sortie),
avg(a.ntk_entree),
avg(a.ntk_sortie),
avg(a.no2_entree),
avg(a.no2_sortie),
avg(a.no3_entree),
avg(a.no3_sortie),
avg(a.pt_entree),
avg(a.pt_sortie),
avg(a.t_entree),
avg(a.t_sortie),
avg(a.ph_entree),
avg(a.ph_sortie)
from tb_process a
inner join tb_step b on (a.code_step = b.code_step)
inner join tb_unite c on (c.code_unite = b.code_unite)
where
(
(a.date_bilan between :date_debut and :date_fin and upper(b.nom_step) like upper(:step || '%'))
)
group by c.nom_unite, b.nom_step |
Partager