I'm trying to pull the MAX and MIN values from a mySQL table. Let's say I have the a column called "number" with the following values:
20
100
30
50
SELECT MIN(number) AS low, MAX(number) AS high FROM table GROUP BY id
That will return the following:
low = 100
high = 50
It is obviously determining the MIN and MAX from the first number, not the entire number. Is there a fix for this, or a different way to do it that I'm not aware of? Much thanks in advance.