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 36 37 38 39
| SELECT
liste_formation.id_formation,
libelle_sujet_formation_ar ,
libelle_sujet_formation_fr,
DATE_FORMAT(debut,'%Y-%m-%d') AS debutto,
DATE_FORMAT(fin,'%Y-%m-%d') AS fine,
duree,
libelle_formation_ar,
libelle_formation_fr,
particip_estimatif,
COUNT(formation_effectuee.id_formation) AS particip_reel,
COUNT(formation_effectuee.id_formation)*100/particip_estimatif as pourcentage,
cout_global
FROM
liste_formation,
sujet_formation,
emplacement_formation,
formation_effectuee
WHERE
liste_formation.id_sujet_formation=sujet_formation.id_sujet_formation
AND
emplacement_formation.id_emplacement=liste_formation.id_emplacement
AND
formation_effectuee.id_formation=liste_formation.id_formation
AND
year(debut)='2014'
GROUP BY
liste_formation.id_formation,
libelle_sujet_formation_ar,
libelle_sujet_formation_fr,
DATE_FORMAT(debut,'%Y-%m-%d'),
DATE_FORMAT(fin,'%Y-%m-%d'),
duree,
libelle_formation_ar,
libelle_formation_fr,
particip_estimatif,
formation_effectuee.id_formation,
cout_global
ORDER BY debutto ASC; |
Partager