Samples
Given a table calledliveness containing weekly heartbeat aggregates in column health with timestamp column date,
use this query to see how many intervals the system was up in a given week:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Count the number of live ranges
liveness containing weekly heartbeat aggregates in column health with timestamp column date,
use this query to see how many intervals the system was up in a given week:
SELECT num_live_ranges(health)
FROM liveness
WHERE date = '01-9-2022 UTC'
num_live_ranges
---------
5
num_live_ranges(
agg HEARTBEATAGG
) RETURNS BIGINT
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| agg | HeartbeatAgg | - | ✔ | A heartbeat aggregate to get the number of ranges from |
| Column | Type | Description |
|---|---|---|
| num_live_ranges | bigint | The number of live ranges in the aggregate. |