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
| SELECT a.idSalarie,
a.idFormateur,
b.nom +' '+ b.prenom stagiaire,
d.nom +' '+d.prenom AS formateur,
((f.nbreHeure*c.salaireMoy/COUNT(g.idSalarie))+(f.nbreHeure*e.salaireMoy)) AS cout1,
(a.nbreHeure*c.salaireMoy/COUNT(g.idSalarie))+(a.nbreHeure*e.salaireMoy) AS cout2
FROM
EffectueFormationInterne a,
Salarie b,
Csp c,
Salarie d,
Csp e,
ProposeFormationInterne f,
EffectueFormationInterne g
WHERE
c.idCsp = b.idCsp
AND b.idSalarie=a.idSalarie
AND d.idCsp=e.idCsp
AND d.idSalarie =a.idFormateur
AND f.idFormation=a.idFormation
AND f.idFormateur=a.idFormateur
AND a.idFormation='10'
AND a.annee = '2006'
AND g.idFormation='10'
AND g.annee = '2006'
GROUP BY
a.idSalarie,
a.idFormateur,
b.nom +' '+ b.prenom ,
d.nom +' '+d.prenom ,
a.nbreHeure,
c.salaireMoy |
Partager