Skip to content

Commit 04bd611

Browse files
authored
runningTotal_sales.sql
1 parent c998e01 commit 04bd611

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runningTotal_sales.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SELECT invoiceDate, qtyShip,
2+
sum(qtyShip * unitPrice) OVER(ORDER BY invoiceDate ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as RT_Sales
3+
4+
FROM DBO.InvoiceDetailHistory
5+
6+
WHERE item = '123456789'

0 commit comments

Comments
 (0)