If you want to do MAX, MIN, AVG or other kind of mathematical operation on non-numeric MySQL columns (such as longtext for meta_value
in WordPress), you can cast it to float like this:
SELECT meta_key, MAX(meta_value+0.0) max_meta FROM postmeta WHERE meta_key='your_key' GROUP BY meta_key