# points_double

Floating-point time series: one row per sample, per channel. This is the table most telemetry queries read.

Telemetry table, so every query must filter by `dataset_rid`.

For what a channel is, see [Channels](https://dev.nominal.io/platform/data-model.md#channels) in the data model.

## Columns

| Column | Type | Nullable | Notes |
| --- | --- | --- | --- |
| `ts` | `TIMESTAMP` | No | Sample time, nanosecond precision. |
| `value` | `DOUBLE` | Yes | The sample. Null where a sample exists but carries no value. |
| `channel` | `VARCHAR` | No | Channel name. |
| `dataset_rid` | `VARCHAR` | No | Dataset the sample belongs to. Required in the `WHERE` clause. |
| `tags` | `MAP` | No | Key-value pairs recorded with the series. See [Filtering by tag](https://dev.nominal.io/sql-guides/writing-queries.md#filtering-by-tag). |

## Examples

Read one channel in time order:

```sql
SELECT ts, value
FROM points_double
WHERE dataset_rid = '<dataset-rid>'
  AND channel = '<channel name>'
ORDER BY ts
LIMIT 1000
```

Average per minute, using `DATE_BIN` to bucket:

```sql
SELECT DATE_BIN(INTERVAL '1' MINUTE, ts, TIMESTAMP '1970-01-01 00:00:00') AS bucket,
       AVG(value) AS mean_value
FROM points_double
WHERE dataset_rid = '<dataset-rid>'
  AND channel = '<channel name>'
GROUP BY bucket
ORDER BY bucket
```

Per-channel extremes across a dataset:

```sql
SELECT channel, MIN(value) AS lo, MAX(value) AS hi, COUNT(*) AS samples
FROM points_double
WHERE dataset_rid = '<dataset-rid>'
GROUP BY channel
ORDER BY channel
```

## Next steps

- [channels](https://dev.nominal.io/sql-reference/schema/channels.md): list the channels in a dataset and their data types.
- [Function reference](https://dev.nominal.io/sql-reference/schema/function-reference.md): available functions, including telemetry-only ones like `DATE_BIN`.
