Is there an elegant way to do this in MySQL:
SELECT (subquery1) AS s1, (subquery2) AS s2, (s1+s2) AS s3
or must I resort to
SELECT (subquery1) AS s1, (subquery2) AS s2, ((subquery1)+(subquery2)) AS s3
?
Thanks
EDIT: both subqueries yield integer results
You can use variables within MySQL
Still not that elegant. Perhaps you could elaborate on the subqueries so we could perhaps suggest better ways?