On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Function AVG
Functions SUM, MAX, MIN
30. MAX and MIN


Great. Okay, one final piece of information: you can also use DISTINCT with MIN or MAX to find the minimum or maximum value, respectively.

FROM project;

What is the difference between MAX(price) and MAX(DISTINCT price)? Well, we hate to disappoint you, but there is none. :)

It's just an interesting fact about SQL that you can use DISTINCT with MIN or MAX but it won't change anything.


Check it out for yourself. Show four columns:

  • the maximum number of words in a project (as max),
  • the maximum distinct number of words (as max_distinct),
  • the minimum number of words (as min),
  • and the minimum distinct number of words (as min_distinct).