kingberrill of SQL
7/2/2017 - 8:15 PM

MIN() MAX()

MIN() MAX()

-- To get the maximum value of a numeric column use the MAX() function.
SELECT MAX(<numeric column>) FROM <table>;
SELECT MAX(<numeric column>) FROM <table> GROUP BY <other column>;

--To get the minimum value of a numeric column use the MIN() function.
SELECT MIN(<numeric column>) FROM <table>;
SELECT MIN(<numeric column>) FROM <table> GROUP BY <other column>;