Samples
Given a table of stock data, estimate how many times the symbolAAPL appears:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Estimate the number of times a value appears from a CountMinSketch
AAPL appears:
WITH t AS (
SELECT toolkit_experimental.count_min_sketch(symbol, 0.01, 0.01) AS symbol_sketch
FROM crypto_ticks
)
SELECT toolkit_experimental.approx_count('AAPL', symbol_sketch)
FROM t;
approx_count (
item TEXT,
agg CountMinSketch
) RETURNS BIGINT
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
item | TEXT | - | ✔ | The value you want to estimate occurrences of |
agg | CountMinSketch | - | ✔ | A CountMinSketch object created using count_min_sketch |
| Column | Type | Description |
|---|---|---|
| approx_count | BIGINT | The estimated number of times item appeared in the sketch |