Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

median mysql

SELECT x.val from data x, data y
GROUP BY x.val
HAVING SUM(SIGN(1-SIGN(y.val-x.val))) = (COUNT(*)+1)/2
 
PREVIOUS NEXT
Tagged: #median #mysql
ADD COMMENT
Topic
Name
3+2 =