Guest_imported
New member
- Jan 1, 1970
- 0
Hi everyone,
I've a little problem with a select statement ... perhaps anyone can help me.
I've a statement that is similar to the statement below:
SELECT
table1.column1,
sum(<very:long_expression1>) bla1,
sum(<very:long_expression2>) bla2
FROM
... several tables ...
WHERE
... several contraints ...
GROUP BY
table1.column1
Now I would like to have the sum of the both returned sums:
SELECT
table1.column1,
sum(<very:long_expression1>) bla1,
sum(<very:long_expression2>) bla2,
(bla1 + bla2) bla3 -- here an error occures
FROM
... several tables ...
WHERE
... several contraints ...
GROUP BY
table1.column1
Does anyone know how to fix that?
I've a little problem with a select statement ... perhaps anyone can help me.
I've a statement that is similar to the statement below:
SELECT
table1.column1,
sum(<very:long_expression1>) bla1,
sum(<very:long_expression2>) bla2
FROM
... several tables ...
WHERE
... several contraints ...
GROUP BY
table1.column1
Now I would like to have the sum of the both returned sums:
SELECT
table1.column1,
sum(<very:long_expression1>) bla1,
sum(<very:long_expression2>) bla2,
(bla1 + bla2) bla3 -- here an error occures
FROM
... several tables ...
WHERE
... several contraints ...
GROUP BY
table1.column1
Does anyone know how to fix that?