Previous Topic: LowercaseNext Topic: Minimum


Maximum

The maximum function returns the highest value in the specified column for all occurrences with the same GROUP BY value.

Syntax:

►►─┬─ MAX ─────┬─ (value) ────────────────────────────────────────────────────►◄
   ├─ MAXIMUM ─┤
   ├─ HIV ─────┤
   └─ HIVAL ───┘

Invocation names:

MAX       HIV
MAXIMUM   HIVAL

Parameters:

(value)

The column or expression for which the maximum value is calculated.

Example:

This example determines the maximum salary in each department:

select max(salary) as 'top salary' from employee

  TOP SALARY = '75000'