state and duration. You can rename them using the same method as renaming a table.
Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| agg | StateAgg | - | ✔ | A state aggregate created with compact_state_agg |
Returns
| Column | Type | Description |
|---|---|---|
| state | TEXT | BIGINT | A state found in the state aggregate |
| duration | INTERVAL | The total time spent in that state |
Samples
Create a state aggregate from the tablestates_test. The time column is named time, and the state column contains
text values corresponding to different states of a system. Use into_values to display the data from the state
aggregate.