### Archives

- May 2017
- January 2017
- December 2016
- September 2016
- August 2016
- July 2016
- February 2013
- January 2013
- December 2012
- August 2012
- July 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- September 2011
- August 2011
- May 2011
- April 2011
- January 2011
- December 2010
- November 2010
- October 2010

# 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 Beginner, Examples, Microsoft, MSSQL, SQL, SQL Server, Statistics, T-SQL
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 Code, Databases, Examples, Math, Median, Queries, Statistics, T-SQL
Leave a comment