Subject | Re: [firebird-support] SQL UNION ALL |
---|---|
Author | Aage Johansen |
Post date | 2005-02-24T21:32:34Z |
Alberto Pesce wrote:
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.
> I tryed your's solutions but not run because if I remove the statemant GroupI think there are several problems with your queries (as posted).
> by and Order from the first select the function SUM in Select statemant
> don't accepted.
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.