I am having a lot of problems with the following structure. Please could anybody help me with this.
SELECT
MAX(intermediate.test)
FROM
(
SELECT SUM(table.field) FROM tabledfsd INNER JOIN ....
+
SELECT SUM(table.field) FROM tabledfsd INNER JOIN ....
) intermediate
//or simplier example
SELECT
MAX(intermediate.test)
FROM
(
SELECT SUM(1+4)
+
SELECT SUM(2+6)
) intermediate
What is a correct syntax for this? Is even possible to calculate two selects inside subquery?
tnx!