Search SSWUG.ORG:



DATABASES

Calculating the Median Value within a Partitioned Set Using T-SQL This is an off-site link.  Please review our Terms of Service for additional information.


(Dwain Camps) It is ironic that one of the most essential of statistical aggregations, the median, has been so difficult in the past to calculate efficiently in SQL. Although the recent window functions provide the solution, there isn't an obviously superior algorithm performance-wise, particularly when working across partitioned sets.

Read this article..







comments powered by Disqus