Partitioned Running Totals

Question:

The stocks must be ordered first by sector and second by name. They are about to enter our portfolio one by one. When all the stocks from the same sector have entered then passive investment starts and the portfolio takes off. We would like to know what the running total dividend of the stocks is.

Return: name, sector, running total dividend

Order by: sector, name

Show Table
Show Desired Output

Query Window:

Click me!

Show Hint
Show Answer

Your output: