---
title: "min()"
component: "gsql-ref"
version: "4.1"
module: "ddl-and-loading"
html_url: "/gsql-ref/4.1/ddl-and-loading/functions/reducer/min"
canonical_url: "https://www.tigergraph.com/docs/gsql-ref/4.1/ddl-and-loading/functions/reducer/min"
markdown_url: "https://www.tigergraph.com/docs/gsql-ref/4.1/ddl-and-loading/functions/reducer/min.md"
---

[View as HTML](https://www.tigergraph.com/docs/gsql-ref/4.1/ddl-and-loading/functions/reducer/min)

# min()

The reducer function `min()` aggregates all values corresponding to the same ID and returns the minimum value.

## Syntax

`REDUCE( min (arg) )`

## Accepted parameter types

This function only accepts parameters that can be interpreted as a numeric type.

## Return value

`INT`, `UINT`, `FLOAT`, `DOUBLE`: minimum of all arg values cumulatively received

## Example

If we have the following data in a CSV file of the different scores of test takers, and we want to load the lowest score to an attribute of the vertex:

| name | score |
| --- | --- |
| Tommy | 95 |
| Tommy | 93 |
| Tommy | 92 |
| Amy | 85 |
| Amy | 94 |
| Amy | 99 |

We can use write the following load statement to use the `min()` reduce function to load the minimum of the scores matching each vertex ID.

```gsql
LOAD f TO VERTEX Person
  VALUES ($"name", REDUCE(min($"score"))
```

After loading, Tommy has a `score` attribute of 92 and Amy has a `score` attribute of 85.
