Je cherche à afficher comme résultat, la direction qui a le plus grand nombre de jours de formation. Ici je trouve paris, mais comment faire afficher par la requête PARIS uniquement ?
J'ai fait des essais avec having, mais cela ne marche pas![]()
![]()
select distinct d.direction,st.duree
from directions d,stagiaires s,stages st, participations p
where d.no_direction=s.direction_no_direction
and s.no_stagiaire=p.stag_no_stagiaire
and p.stage_no_stage=st.no_stage
group by d.direction,st.duree
order by direction ;
DIRECTION DUREE
BORDEAUX 5
BORDEAUX 1
NANTES 2
TOULON 2
CHAMPAGNE-ARDENNE 5
LYON 2
LYON 1
PARIS 1
PARIS 2
PARIS 5
PARIS 3
PARIS 4
Merci pour votre aide
Partager