> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Aggregate function that calculates the minimum across a group of values.

# min

<h2 id="min">
  min
</h2>

Introduced in: v1.1.0

Aggregate function that calculates the minimum across a group of values.

**Syntax**

```sql theme={null}
min(column)
```

**Arguments**

* `column` — Column name or expression. [`Any`](/reference/data-types/index)

**Returned value**

Returns the minimum value across the group with type equal to that of the input. [`Any`](/reference/data-types/index)

**Examples**

**Simple min example**

```sql title=Query theme={null}
CREATE TABLE employees (name String, salary UInt32) ENGINE = Memory;
INSERT INTO employees VALUES ('Alice', 3000), ('Bob', 4000), ('Charlie', 3500);

SELECT min(salary) FROM employees;
```

```response title=Response theme={null}
┌─min(salary)─┐
│        3000 │
└─────────────┘
```

**Min with GROUP BY**

```sql title=Query theme={null}
CREATE TABLE sales (department String, revenue UInt32) ENGINE = Memory;
INSERT INTO sales VALUES ('Engineering', 100000), ('Engineering', 120000), ('Marketing', 80000), ('Marketing', 90000);

SELECT department, min(revenue) FROM sales GROUP BY department ORDER BY department;
```

```response title=Response theme={null}
┌─department──┬─min(revenue)─┐
│ Engineering │       100000 │
│ Marketing   │        80000 │
└─────────────┴──────────────┘
```
