MIN()

Documentation

Home » Documentation » Using VoltDB

MIN()

MIN() — Returns the minimum value from a range of column values.

Synopsis

MIN( column-expression )

Description

The MIN() function returns the lowest value from a range of column values. The range of values depends on the constraints defined by the WHERE and GROUP BY clauses.

Example

The following example returns the lowest price in the product list.

SELECT MIN(price) FROM product_list;

The next example returns the lowest price for each product category.

SELECT category, MIN(price) FROM product_list
   GROUP BY category
   ORDER BY category;