i have a column which is a sum of a group by. i want to multiply this column to another column using the following query. I tried using a subquery but it does not work.
SUM("subq.public"."fpProjects"."capitalTotalSpent")*"public"."currencyYears".curRate"
FROM(
SELECT
Sum("public"."fpProjects"."capitalTotalSpent") AS "total capital spent",
FROM
"public"."fpProjects"
I get a syntax error here "Sum("public"."fpProjects"."capitalTotalSpent") AS "total cap"