> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> timeSeriesTimeRanges table function returns the time ranges table used by table `db_name.time_series_table` whose table engine is the TimeSeries engine.

# timeSeriesTimeRanges

`timeSeriesTimeRanges(db_name.time_series_table)` - Returns the [time ranges](https://clickhouse.com/docs/reference/engines/table-engines/integrations/time-series.md#time-ranges-table) table
used by table `db_name.time_series_table` whose table engine is the [TimeSeries](https://clickhouse.com/docs/reference/engines/table-engines/integrations/time-series.md) engine, for example:

```sql theme={null}
CREATE TABLE db_name.time_series_table ENGINE=TimeSeries TIME RANGES INNER UUID '01234567-89ab-cdef-0123-456789abcdef'
```

The following queries are equivalent:

```sql theme={null}
SELECT * FROM timeSeriesTimeRanges(db_name.time_series_table);
SELECT * FROM timeSeriesTimeRanges('db_name.time_series_table');
SELECT * FROM timeSeriesTimeRanges('db_name', 'time_series_table');
```

> [!NOTE]
>
> The *time ranges* table exists if the `store_time_ranges` setting is enabled.
> Tables of [version](https://clickhouse.com/docs/reference/engines/table-engines/integrations/time-series.md#schema-versioning) 7 or earlier keep the columns `min_time` and `max_time`
> in the [tags](https://clickhouse.com/docs/reference/engines/table-engines/integrations/time-series.md#tags-table) table.
