MAX()

Documentation

VoltDB Home » Documentation » Using VoltDB

MAX()

MAX() — Returns the maximum value from a range of column values.

Synopsis

MAX( column-expression )

Description

The MAX() function returns the highest 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 highest price in the product list.

SELECT MAX(price) FROM product_list;

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

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