MySQL – Find Minimum and Maximum Values in Column

You can find the Minimum and Maximum values in a column using SQL.

min()

max()

Select min(temp) from temp;

Select min(temp), max(temp), avg(temp) from temp;

Select min(temp) from temp where macAddress =  macAddress=‘60bbbaa4ae30’;

Select macAddress, min(temp), max(temp), avg(temp) from temp group by macAddress;

Be the first to comment

Leave a Reply