Skip to main content

Celonis Product Documentation

MIN
Description

This function calculates the minimum value per group. MIN can be applied on any data type.

Syntax
 MIN ( table.column )
NULL handling

NULL values are ignored, so they do not influence the result. If all the values of a group are NULL, the result for this group is also NULL.

Examples

[1]

Minimum of column.

Query

Column1

         MIN ( "Table"."Column" )
        

Input

Output

Table

Column : int

1

-3

4

Result

Column1 : int

-3

[2]

Get the minimum value by country.

Query

Column1

         "Table"."Country"
        

Column2

         MIN ( "Table"."Values" )
        

Input

Output

Table

Country : string

Values : int

'US'

3

'DE'

10

'DE'

5

'FR'

5

'US'

4

'US'

3

Result

Column1 : string

Column2 : int

'DE'

5

'FR'

5

'US'

3

[3]

Get the minimum value mixed with nulls, grouped by country.

Query

Column1

         "Table"."Country"
        

Column2

         MIN ( "Table"."Values" )
        

Input

Output

Table

Country : string

Values : int

'FR'

10

'FR'

null

'DE'

null

Result

Column1 : string

Column2 : int

'DE'

null

'FR'

10

See also: