1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
select direction, sum_duree
from (select d.direction,sum (st.duree) sum_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)
where sum_duree = (select max (duree)
from (select d.direction,sum (st.duree) sum_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
goup by d.direction)) |
Partager