WebDevelopersNotes logo

home-icon Home / MySQL / Online MySQL course – Finding the minimum and maximum values

Online MySQL course – Finding the minimum and maximum values

Online MySQL course - Finding the minimum and maximum values

MySQL provides inbuilt functions to find the minimum and maximum values.

SQL provides 5 aggregate functions. They are:

  • MIN(): Minimum value
  • MAX(): Maximum value
  • SUM(): The sum of values
  • AVG(): The average values
  • COUNT(): Counts the number of entries

In this session of the online MySQL course, we’ll look at finding the minimum and maximum values in a column.

MySQL MIN() – Minimum value

select MIN(salary) from employee_data;

+-------------+
| MIN(salary) |
+-------------+
|       70000 |
+-------------+
1 row in set (0.00 sec)

MySQL MAX() – Maximum value

select MAX(salary) from employee_data;

+-------------+
| MAX(salary) |
+-------------+
|      200000 |
+-------------+
1 row in set (0.00 sec)

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

The first product to be scanned using a bar code was a pack of Wrigley's chewing gum at Marsh Supermarket in Troy, Ohio. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy