bonjour,
voila, j ai un pb de group by sur 2 select avec union, je m'explique:
j'ai
(select a,b,c
from ...
where ...)
UNION
(select a,b,c
from...
where...)
et je voudrais faire une agregation sur certains champs en utilisant le group by, j'ai donc fait :
(
select a,b,sum(c)
from
(select a,b,c
from ...
where ...) tab
group by a,b
)
UNION
(
select a,b,sum(c)
from
(select a,b,c
from ...
where ...) tab2
group by a,b
)
Mais cà me donne un résultat bizarre , complétement faux...
quelqu'un pourrait il me venir en aide, s il vous plait ?
Partager