MAX value but only once

Hello,

I want to get the maximum value from a column in a MySQL table.

I DO NOT REQUIRE ALL ENTRIES ONLY THE HIGHEST VALUE ONCE.

For example, if 150 was the highest value in the column and it appeared 20 times I just want the number 150 once (not 20 times)

Any ideas?

Matt.

I would use mySQL to do something like this: SELECT column-name FROM table-name ORDER BY column-name DESC LIMIT 1 to get the maximum value.

Maybe others have better, more efficient ways of doing it, but this works for me.

yes that works - I also need the lowest value once but this does not work:

SELECT data1 FROM TABLE1 ORDER BY data1 ASC LIMIT 1

it is working now - the lowest value was blank/empty - my mistake

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.