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 values
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(TotalSum) AS MinTotalSum
FROM Order;

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

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

Exercise

Select the highest salary from the Employee table. Name the column MaxSalary.

Stuck? Here's a hint!

Type:

SELECT
  MAX(Salary) AS MaxSalary
FROM Employee;