hi,
I have a table with 8 set of numbers in a col, for which i need to calculate the median. and show the percentage.
Median Calculation::
3, 13, 7, 5, 21, 23, 23, 40
When we put those numbers in order we have::
3, 5, 7, 13, 21, 23, 23, 40
Taking the middle nums :: 13 and 21 .
To find the value halfway between them, add them together and divide by 2:
13 + 21 = 34
then 34 ÷ 2 = 17
So the Median in this example is 17.
So this is how we calc median , but i am unable to take the middle nums in sql. Please help me knowing how to take the middle nums 13 and 21 and also calculating the percentage of the median.
Please help.
Thanks in advance :)