Tag Archives: Statistics

Calculating Statistical Values in T-SQL: Mean (Average), Median, Mode and Range

Sometimes you may need to calculate statistical values based on a set of values you have in a table. Let’s start with explaining what these values represent, in case you don’t already know. For the purposes of this post, we … Read More »»»

Posted in MSSQL | Tagged , , , , , , , | Leave a comment

How to Calculate a Median in T-SQL

Expectantly, you’d assume that Microsoft had built in a function to calculate a median of a set of values. Expect less! Or, rather none. There is no built-in function in T-SQL to calculate a median. I do not know the … Read More »»»

Posted in MSSQL | Tagged , , , , , , , | Leave a comment