Table of Contents

Search

  1. Preface
  2. Function reference
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. System variables
  8. Datatype reference

Function Reference

Function Reference

MIN (Dates)

MIN (Dates)

Returns the earliest date found in a field or group. You can apply a filter to limit the rows in the search. You can also use MIN to return the smallest numeric value or the lowest string value in a field or group.
You can nest only one other aggregate function within MIN, and the nested function must return a date data type.
You cannot nest aggregate functions in advanced mode.
Use only in
mapping
tasks.

Syntax

MIN(
date
[,
filter_condition
] )
Argument
Required/
Optional
Description
date
Required
Date/time data type. Passes the values for which you want to return minimum value. You can enter any valid transformation expression.
filter_condition
Optional
Limits the rows in the search. The filter condition must be a numeric value or evaluate to TRUE, FALSE, or NULL. You can enter any valid transformation expression.

Return Value

Date if the
value
argument is a date.
NULL if all values passed to the function are NULL, or if no rows are selected (for example, the filter condition evaluates to FALSE or NULL for all rows).

Nulls

If a single value is NULL, MIN ignores it. However, if all values passed from the field are NULL, MIN returns NULL.

Group By

MIN groups values based on group by fields you define in the transformation, returning one result for each group.
If there is no group by field, MIN treats all rows as one group, returning one value.

Example

The following expression returns the oldest order date for flashlights:
MIN( ORDER_DATE, ITEM_NAME='Flashlight' )
ITEM_NAME
ORDER_DATE
Flashlight
Apr 20 1998
Regulator System
May 15 1998
Flashlight
Sep 21 1998
Diving Hood
Aug 18 1998
Halogen Flashlight
Feb 1 1998
Flashlight
Oct 10 1998
Flashlight
NULL
RETURN VALUE:
Feb 1 1998

0 COMMENTS

We’d like to hear from you!
Jocelyn Habeillon-Wolf - October 06, 2022

Why Return value is Feb 1 1998, as there is no ITEM_NAME 'Flashight' with this date?
There is an ITEM_NAME 'Halogen Flashlight', but still it is not the same ITEM_NAME value.

Informatica Documentation Team - October 07, 2022

Hello Jocelyn, We are currently reaching out to development to verify the return value listed for this function and will get back to you shortly.

Thanks so much for bringing this to our attention.

Sincerely,

Informatica Documentation Team


Informatica Documentation Team - October 18, 2022

Hello again Jocelyn, We have confirmed with our QA team that the return value shown for this function is correct. The return value will be "Feb 1 1998."