Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
How to aggregate values in a sub query??
How to aggregate values in a subquery. I have tried following query
SELECT 'abc' AS ctx,
'ALL' AS Anpe,but i get the error as
SUM(A.TID) AS TID,
SUM(A.AMT) AS AMT,
SUM(A.BMT) AS BMT,
(SELECT SUM(rzrm) FROM abcd o) AS rzrm
FROM xyz a
GROUP BY 1
Subqueries in the SELECT or ORDER BY are not supported if the subquery is not part of the GROUP BY