Tabular IQ
Back to Function Index

GREATEST()

Overview

GREATEST() (formerly MAX()) returns the largest value from a list of numbers. This function is useful for finding maximum values, setting upper bounds, and performing comparative analysis. It works with any number of arguments and handles both positive and negative numbers.

Function Format

GREATEST(number1 [, number2, number3, ...])

Return Value

GREATEST() returns a numeric value

Examples


// Basic maximum value
GREATEST(5, 3, 8) = 8

// Negative numbers
GREATEST(-5, -3, -8) = -3

// Additional examples
GREATEST(10, 10, 10) = 10     // Identical values
GREATEST(0, 0, 0) = 0         // Zero values
GREATEST(1, 2, 3, 4, 5) = 5   // Sequential numbers
GREATEST(100, 200, 300) = 300 // Large numbers

Notes

  • Important behaviors:
    • Returns largest value
    • Works with any number of arguments
    • Handles negative numbers
    • Preserves decimal precision
    • Works with various numeric types
  • Common use cases include:
    • Finding maximum values
    • Setting upper bounds
    • Comparative analysis
    • Data validation
    • Range calculations
  • The function is useful for:
    • Value comparison
    • Boundary checking
    • Data analysis
    • Range determination
  • Important considerations:
    • Requires at least one argument
    • Handles all numeric types
    • Preserves precision
    • Works with null values

See Also