What\'s the simplest (and hopefully not too slow) way to calculate the median with MySQL? I\'ve used AVG(x) for finding the mean, but I\'m having a hard time fi
AVG(x)
Knowing exact row count you can use this query:
SELECT AS VAL FROM ORDER BY VAL LIMIT 1 OFFSET Where = ceiling( / 2.0) - 1 0 讨论(0) 查看其它30个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
Where = ceiling( / 2.0) - 1
= ceiling( / 2.0) - 1