---
title: ES|QL MIN_OVER_TIME function
description: 
url: https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/time-series-aggregation-functions/min_over_time
products:
  - Elasticsearch
---

# ES|QL MIN_OVER_TIME function
<applies-to>
  - Elastic Stack: Preview from 9.2 to 9.3
</applies-to>


## Syntax

![Embedded](https://www.elastic.co/docs/reference/query-languages/esql/images/functions/min_over_time.svg)


## Parameters

<definitions>
  <definition term="field">
    the metric field to calculate the value for
  </definition>
  <definition term="window">
    the time window over which to compute the minimum
  </definition>
</definitions>


## Description

Calculates the minimum over time value of a field.

## Supported types


| field                                                                               | window                                                                  | result        |
|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------|---------------|
| aggregate_metric_double                                                             | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | double        |
| boolean                                                                             | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | boolean       |
| date                                                                                | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | date          |
| date_nanos                                                                          | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | date_nanos    |
| double                                                                              | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | double        |
| exponential_histogram <applies-to>Elastic Stack: Preview in 9.3</applies-to>        | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | double        |
| integer                                                                             | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | integer       |
| ip                                                                                  | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | ip            |
| keyword                                                                             | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | keyword       |
| long                                                                                | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | long          |
| tdigest <applies-to>Elastic Stack: Preview in 9.3</applies-to>                      | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | double        |
| text                                                                                | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | keyword       |
| unsigned_long <applies-to>Elastic Stack: Generally available since 9.2</applies-to> | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | unsigned_long |
| version                                                                             | time_duration <applies-to>Elastic Stack: Preview since 9.3</applies-to> | version       |


## Example

```esql
TS k8s
| STATS cost=SUM(MIN_OVER_TIME(network.cost)) BY cluster, time_bucket = TBUCKET(1minute)
```


| cost:double | cluster:keyword | time_bucket:datetime     |
|-------------|-----------------|--------------------------|
| 29.0        | prod            | 2024-05-10T00:19:00.000Z |
| 27.625      | qa              | 2024-05-10T00:06:00.000Z |
| 24.25       | qa              | 2024-05-10T00:09:00.000Z |