Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Ordering
Limiting the output
Eliminating duplicate results
Aggregation
15. Find the minimum and maximum value
Grouping
HAVING: filtering and ordering groups
Let's practice

Instruction

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.

Exercise

Select the highest salary from the employees table.

Stuck? Here's a hint!

Type:

SELECT MAX(salary)
FROM employees;