Bonjour,

Mes tables :

Employe (idemploye, nom Employe, adresseCourriel)
1876 Martin Rey martin.rey@jegere.ca
2231 Jean Pierre Bordeau jean.bordeau@jegere.ca
4354 Louise Gagnon louise.gagnon@jegere.ca
1212 Marie St-Jerome marie.stjerome@jegere.ca

ReesourcesProjets (idProjet, IdEmploye, nbrHeure, prixheure)
1 1876 500 65
1 4354 2000 31
2 2231 250 55
3 2231 500 65
3 1212 3000 35
3 1876 2000 35

Mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
SELECT idEmploye, nomEmploye, adressecourriel, SUM(nbrheures) AS nbrHeures, nbrheures * prixheure AS sommegagnee FROM ressourcesprojet NATUREL JOIN Employe USING (idEmploye)
GROUP BY idEmploye
Le résultat :
idEmploye nomEmploye adressecourriel nbrHeures sommegagnee
1212 Marie St-Jerome marie.st-jerome@jegere.ca 3000 105000
1876 Martin Rey martin.rey@jegere.ca 2500 32500
2231 Jean Pierre Bordeau jean.bordeau@jegere.ca 750 13750
4354 Louise Gagnon Louise.gagnon@jegere.ca 2000 62000


Comment faire pour avoir la bonne réponse pour les sommegagnee?

Merci!