This is for a single column, and I don't want to group - so not using AVG

Want to just average all the numerical values in a column, into a single result.

What is this missing?

$result = "SELECT amounts FROM inventory 
(SUM( inventory.amounts ) / ( COUNT( mysql_num_rows($result))";
Aside from this, what would be needed to get a median value? Divide mysql_num_rows by 1/2 ?