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:
… or spatial data type:
One practical example of this method is visualizing SQL Agent Jobs from Daniel Hutmacher – very useful to make a better job schedule.
Watch the video and give it a thumbs up if you like it:
Entire demo script is here.
Ist is wunderbar!!