1
Answer

Windowed functions cannot be used in the context of another windowed

Photo of Ramco Ramco

Ramco Ramco

Mar 26
137
1

Hi

   Error - Windowed functions cannot be used in the context of another windowed function or aggregate.

SELECT
ROW_NUMBER() OVER (PARTITION BY Account ORDER BY A."Account") AS "RowNo",
A."Account" AS "Account",
(A."Debit") AS "Debit", 
SUM(A."Debit" - A."Credit") OVER (PARTITION BY Account ORDER BY ROW_NUMBER() OVER (PARTITION BY Account ORDER BY A."Account")) AS Balance
From Master A

Thanks

Answers (1)