Skip to content
RED SAG Skills
hardStudy question · answer published in SQL interview questions, so no pointssqlwindow-functions

Running total with tied dates

sales has (d, amt): (01-01, 10), (01-02, 20), (01-02, 30), (01-03, 40). What running total does the query show for the row (01-02, 20)?

SELECT d, amt, SUM(amt) OVER (ORDER BY d) AS running
FROM sales;
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions