O'Reilly logo
  • Matthew Perkovic thinks this is interesting:

Using a combination of ORDER BY and LIMIT, it is possible to find the highest or lowest value in a column. The following example demonstrates how to find the value of the most expensive item:

Input

SELECT prod_price
FROM products
ORDER BY prod_price DESC
LIMIT 1;

Output

From

Cover of MySQL® Crash Course

Note

How to find the highest or lowest value?