Check out example codes for "max in sql". It will help you in understanding the concepts better.

Code Example 1

SELECT MAX(column_name)

FROM table_name

WHERE condition;

Code Example 2

SELECT MIN(column_name)

FROM table_name

WHERE condition;

Learn ReactJs, React Native from akashmittal.com