Have SUM() fun!
Did you know that SUM() aggregate can be used together with OVER() clause? A short intro to windowing functions:
1 2 |
SELECT SUM(Amount) OVER() -- What!? FROM dbo.PersonCityAmount |
The result is graphically visualized by using only SQL Server Management Studio and unicode characters: