> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-dx-3089.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# $min

`$min` returns the minimum field value across matching documents.

If `missing` is set, missing fields are treated as that value.

### Compatibility

| Field Type | Supported |
| - | - |
| TEXT | No |
| U64/I64/F64 | Yes |
| DATE | Yes |
| BOOL | Yes |
| KEYWORD | No |
| FACET | No |

Field must be `FAST`.

### Arguments

| Argument | Type | Required | Description |
| - | - | - | - |
| `field` | `string` | Yes | Field to aggregate. |
| `missing` | `number` | No | Fallback value for missing fields. |

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
    await index.aggregate({
      aggregations: {
        cheapest: { $min: { field: "price", missing: 0 } },
      },
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    index.aggregate(
        aggregations={"cheapest": {"$min": {"field": "price", "missing": 0}}}
    )
    ```
  </Tab>

  <Tab title="Redis CLI">
    ```bash theme={null}
    SEARCH.AGGREGATE products '{}' '{"cheapest": {"$min": {"field": "price", "missing": 0}}}'
    ```
  </Tab>
</Tabs>

### Output

```json theme={null}
{ "cheapest": { "value": 0 } }
```

`value` can be `null` when no values are available.


## Related topics

- [$histogram](/redis/search/aggregation-operators/bucket-aggregations/histogram.md)
- [$dateHistogram](/redis/search/aggregation-operators/bucket-aggregations/date-histogram.md)
- [Aggregations](/redis/search/aggregations.md)
- [$stats](/redis/search/aggregation-operators/metric-aggregations/stats.md)
- [AROP](/redis/commands/array/arop.md)
