Bonjour,
J'ai une table intervenants(id_int, nom, prenom) et une table sceances(id_int, id_proj, date, nb_h) et je souhaiterai afficher la liste de tous les intervenants trié par volume horaire (sum(nb_h)). J'en suis à cette requête qui ne m'affiche que les intervenants du projet 1 :
Une idée du pourquoi du comment?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 select intervenants.id_int, nom, prenom, sum(nb_h) as total from intervenants LEFT OUTER JOIN sceances ON intervenants.id_int=sceances.id_int WHERE (sceances.id_proj=1 OR sceances.id_proj is NULL) group by intervenants.id_int order by total DESC
Merci.
Partager