Subject Re: [firebird-support] SQL UNION ALL
Author Aage Johansen
Alberto Pesce wrote:
> I tryed your's solutions but not run because if I remove the statemant Group
> by and Order from the first select the function SUM in Select statemant
> don't accepted.

I think there are several problems with your queries (as posted).
SELECT SUM(A), B, C, D
FROM X,T,Z
WHERE set_condition_1
GROUP BY B, C, D, A
ORDER BY B

What about the three tables (X, T, and Z).
You must group by all non-aggregates (B, C, and D), and not by anything
else (like A).
It might be easier to help if you posted the real query - maybe simplified,
but not too much.


--
Aage J.