[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Median function in SQL Syntax

Posted on 2008-11-03
1
Medium Priority
?
588 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:wsturdev
1 Comment
 
LVL 16

Accepted Solution

by:
brad2575 earned 2000 total points
ID: 22869987
if you have SQL server 2005 this explains it pretty good:

http://www.sqlmag.com/Article/ArticleID/49827/sql_server_49827.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question