I can only imagine doing this with two database queries. The first finds the number of rows in the database, and the second selects with an ORDER BY on the column I am interested in and LIMIT X, 1 where X is half the number of rows.
Is there a simple way to do this with only one query?
Right now I am using averages in my calculations, but I think the mean would be better; there is no upper bound to the values and they are bounded from below by 0.
EDIT: yes, I meant to say 'median' but was having some brain error & searched for 'mean'. I have now found the answer over at stackoverflow

metafor a bit it seems there is a division as to weather this question should be here or at SO. I recognize this might not be a ninja level query, but it's got me stumped and there is not DBA at the company I work for (6 people total). – JIStone May 4 '11 at 19:55