Median function in SQL Syntax

I need to calculate some Means and Medians.

In Excel, there is a "Median" function.  Is there a similar one in SQL?  I am using SQL Server 2005.  "Mean", as far as I know, is just "Average", so I know that is available.

Currently, I am using a Stored Procedure to acquire the Median, but it is much too slow.
LVL 1
wsturdevAsked:
Who is Participating?
 
brad2575Connect With a Mentor Commented:
if you have SQL server 2005 this explains it pretty good:

http://www.sqlmag.com/Article/ArticleID/49827/sql_server_49827.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.