Skip to main content
edited tags
Link
Amira Bedhiafi
  • 10.2k
  • 6
  • 27
  • 64
Active reading. [ <http://en.wikipedia.org/wiki/Microsoft_SQL_Server> <http://en.wikipedia.org/wiki/Transact-SQL>].
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 109
  • 132

Function to Calculate Median in SqlSQL Server

According to MSDN, Median is not available as an aggregate function in Transact-SqlSQL. However, I would like to find out whether it is possible to create this functionality (using the Create Aggregate function, user defined function, or some other method).

What would be the best way (if possible) to do this - allow for the calculation of a median value (assuming a numeric data type) in an aggregate query?

Function to Calculate Median in Sql Server

According to MSDN, Median is not available as an aggregate function in Transact-Sql. However, I would like to find out whether it is possible to create this functionality (using the Create Aggregate function, user defined function, or some other method).

What would be the best way (if possible) to do this - allow for the calculation of a median value (assuming a numeric data type) in an aggregate query?

Function to Calculate Median in SQL Server

According to MSDN, Median is not available as an aggregate function in Transact-SQL. However, I would like to find out whether it is possible to create this functionality (using the Create Aggregate function, user defined function, or some other method).

What would be the best way (if possible) to do this - allow for the calculation of a median value (assuming a numeric data type) in an aggregate query?

Source Link
Yaakov Ellis
  • 41.2k
  • 27
  • 132
  • 176

Function to Calculate Median in Sql Server

According to MSDN, Median is not available as an aggregate function in Transact-Sql. However, I would like to find out whether it is possible to create this functionality (using the Create Aggregate function, user defined function, or some other method).

What would be the best way (if possible) to do this - allow for the calculation of a median value (assuming a numeric data type) in an aggregate query?