I'm having issues calculating the median for my result set and could use some help. I need to provide the median, max, min, avg, and standard deviation. There are 222 rows which can be more or less and I'm not sure what I have so far is an accurate way of calculating the median. Here is my query.
Select
min(nodes) as min_nodes
,max(nodes) as max_nodes
,avg(nodes) as avg_nodes
,max(nodes) + min(nodes))/2 as median_nodes
,stddev(nodes) as sd_nodes
from Table