Mark As Completed Discussion

MIN and MAX

The min() and max() aggregations are used for returning the minimum and maximum values of a specific column, respectively. They may be used on several different data types. That being said, min() can return the earliest date, lowest number, or the non-numerical value that is closest to the letter ‘A’ in the alphabet. As expected, max() is doing the exact opposite; outputs the highest number, the most recent date, or the non-numerical value that comes closest to the letter "Z" in the alphabet. The syntax shown below is for the min() function, but we may get the maximum by simply replacing the MIN() with the MAX() keyword.

TEXT/X-SQL
1SELECT MIN(column)
2 FROM table
3 WHERE condition;