Lesson 22 of 3269%
(Progress persistence is disabled until Phase 9)
SQL
Beginner
MIN() and MAX()
Find minimum and maximum values.
MIN() and MAX()
Find minimum and maximum values.
Example
-- Find the cheapest and most expensive orders
SELECT MIN(total) as Cheapest, MAX(total) as Expensive FROM orders;
Test it Yourself