Ordering
Eliminating duplicate results
Aggregation
13. 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 table employees.

Stuck? Here's a hint!

Type:

SELECT
  max(salary) 
FROM employees;