Get startedGet started for free

Calculate a running total

Business intelligence is the lifeblood of the business role. There is a saying: "if you can't measure it, you can't sell it."

As a marketing analyst, you want to create a graph of cumulative views of articles over the period of time.

This exercise is part of the course

Time Series Analysis in PostgreSQL

View Course

Exercise instructions

  • Calculate a running total of the article views.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

-- Calculate the running total for views
SELECT
    id,
    views,
    ts,
	___ AS running_total
FROM dc_news_fact;
Edit and Run Code