I have a view which calculates rolling sum taking in value form previous row based on PARTITION BY
clause, and I need to indicate one field Im using in PARTITION BYPARTITION BY
clause can have nulls in them.
sum(s."QuantityChange") OVER (PARTITION BY s."LocationId", s."PartId", s."SupplierFacilityId" ORDER BY s."DueDate" ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS "RunningSum"
sometimesSometimes SupplierFacilityId
is null and that's fine, it should still be included in the sum()sum()
calculation.
Is this possible with Postgres?