Best April deals - hours only!Up to 80% off on all courses and bundles.-Close
Limiting the output
Eliminating duplicate results
15. Find the minimum and maximum value
HAVING: filtering and ordering groups
Let's practice


Good job. Of course, COUNT() is not the only function out there. Let's learn some others!

SELECT MIN(total_sum)
FROM orders;

The function MIN(total_sum) returns the smallest value of the column total_sum. In this way, we can find the cheapest order in our table. Convenient, huh?

You can also use a similar function, namely MAX(). That's right, it returns the biggest value of the specified column. Check it for yourself.


Select the highest salary from the employees table.

Stuck? Here's a hint!


SELECT MAX(salary)
FROM employees;