http://it.toolbox.com/blogs/data-ruminations/sql-server-2012-sullenbergerskiles-smoothing-with-bonus-slick-trick-76082