# GREATEST

Returns the greatest value from the list of arguments.

## Syntax

```
GREATEST(VALUE1 [, VALUE2, ..., VALUEN]) 
```

## Arguments

#### VALUE

Type: `double`, `bigint`, `string`, `timestamp`, `date`, `array`

A value of any of the above types, provided that all values are of the same type.

## Returns

Type: same as input

The largest of the provided values.

When the input values are arrays, the greatest element between all the arrays is returned.

If any of the input values are `null`, the result is `null` as well.