Skip to content
Advertisement

Tag: cumulative-sum

How to query cumulative sum period by month

I have an issue with table source like this: Available month in table is only as is from column month, no April, May, June etc. I need to create a view to create “Year to Date” table as shown here: I need to view all months from Year 2020 January – December with value based on table source. VALUE COLUMN

SQL cumulative sum with mutilple conditions

I have a input table as this: I would like to calculate the cumulative sum of the flag for each, but the calculation should be refreshed if the flag is equal to 0 once again. So, the output table should be: So, any suggestion to solve this issue? I tried with this: But i have no idea how can I

Cumulative sum of a column

I have a table that has the below data. I wrote a query that will calculate the sum of cumulative rows and got the below output . Now I want to to filter the data and take only where the POOL <=300, if the POOL field does not have the value 300 then I should take the first value after

Advertisement