I am trying to get the upper quartile, median and lower quartile in SQL Server. Is there any function or formula? Please advice - many thanks
Asked
Active
Viewed 750 times
2 Answers
0
It sounds like you need the ntile function with either 4 (which ranks all the values based on column into 4 buckets ) or 3 which ranks all values in based on a column into three buckets.

benjamin moskovits
- 5,261
- 1
- 12
- 22
0
you can use NTILE function with the Over clause ordering the data by any appropriate column in your table/

puzeledbysql
- 184
- 2
- 12