{"entries":{"datasketch_cpc(INTEGER,FLOAT)":{"name":"datasketch_cpc","type":"aggregate","categories":["CPC"],"returnType":"sketch_cpc","parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"FLOAT | BLOB | DOUBLE | …","paramType":"positional","description":"","typeUnion":["BIGINT","BLOB","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","VARCHAR"]}],"description":"Aggregate input values into a Compressed Probability Counting sketch — a distinct-count sketch that's roughly 40% smaller than HLL at the same accuracy, traded against slower serialization. Choose CPC when you store many sketches at rest and reads are infrequent. The leading `lg_k` controls the size/accuracy trade-off the same way it does for HLL.","examples":[{"description":"Distinct-count with CPC","code":"SELECT datasketch_cpc_estimate(datasketch_cpc(12, user_id)) AS distinct_users\nFROM events;"}],"relatedNames":["datasketch_cpc_estimate","datasketch_cpc_union","datasketch_cpc_lower_bound","datasketch_cpc_upper_bound"]},"datasketch_cpc_describe(sketch_cpc)":{"name":"datasketch_cpc_describe","type":"scalar","categories":["CPC"],"returnType":"VARCHAR","parameters":[{"name":"col0","type":"sketch_cpc","paramType":"positional","description":""}],"description":"Return a string representation of the sketch","examples":[{"description":"","code":"SELECT datasketch_cpc_describe(sketch);"}],"relatedNames":["datasketch_cpc"]},"datasketch_cpc_estimate(sketch_cpc)":{"name":"datasketch_cpc_estimate","type":"scalar","categories":["CPC"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_cpc","paramType":"positional","description":""}],"description":"Read the estimated distinct count from a CPC sketch.","examples":[{"description":"","code":"SELECT datasketch_cpc_estimate(sketch);"}],"relatedNames":["datasketch_cpc","datasketch_cpc_union"]},"datasketch_cpc_is_empty(sketch_cpc)":{"name":"datasketch_cpc_is_empty","type":"scalar","categories":["CPC"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"sketch_cpc","paramType":"positional","description":""}],"description":"Return a boolean indicating if the sketch is empty","examples":[{"description":"","code":"SELECT datasketch_cpc_is_empty(sketch);"}],"relatedNames":["datasketch_cpc"]},"datasketch_cpc_lower_bound(sketch_cpc,UTINYINT)":{"name":"datasketch_cpc_lower_bound","type":"scalar","categories":["CPC"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_cpc","paramType":"positional","description":""},{"name":"col1","type":"UTINYINT","paramType":"positional","description":""}],"description":"Return the lower bound of the number of distinct items seen by the sketch","examples":[{"description":"","code":"SELECT datasketch_cpc_lower_bound(sketch, std_dev);"}],"relatedNames":["datasketch_cpc","datasketch_cpc_upper_bound"]},"datasketch_cpc_union(INTEGER,sketch_cpc)":{"name":"datasketch_cpc_union","type":"aggregate","categories":["CPC"],"returnType":"sketch_cpc","parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"sketch_cpc","paramType":"positional","description":""}],"description":"Merge a column of `sketch_cpc` BLOBs into one rollup sketch — the standard per-partition / per-day rollup pattern.","examples":[{"description":"","code":"SELECT datasketch_cpc_union(k, data);"}],"relatedNames":["datasketch_cpc","datasketch_cpc_estimate"]},"datasketch_cpc_upper_bound(sketch_cpc,UTINYINT)":{"name":"datasketch_cpc_upper_bound","type":"scalar","categories":["CPC"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_cpc","paramType":"positional","description":""},{"name":"col1","type":"UTINYINT","paramType":"positional","description":""}],"description":"Return the upper bound of the number of distinct items seen by the sketch","examples":[{"description":"","code":"SELECT datasketch_cpc_upper_bound(sketch, std_dev);"}],"relatedNames":["datasketch_cpc","datasketch_cpc_lower_bound"]},"datasketch_frequent_items(FLOAT)":{"name":"datasketch_frequent_items","type":"aggregate","categories":["Frequent Items"],"returnType":"sketch_frequent_items","parameters":[{"name":"col0","type":"FLOAT | UINTEGER | SMALLINT | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","VARCHAR","sketch_frequent_items"]}],"description":"Aggregate input values into a Frequent Items (heavy-hitter) sketch. The first argument is `lg_max_map_size` — log₂ of the maximum number of tracked items, so `8` → up to 256 candidates, `12` → up to 4096. Bigger values track more candidates and tighten the per-item error bound. Typical values run 4–12.","examples":[{"description":"Top countries by page views","code":"SELECT datasketch_frequent_items_get_frequent(\n         datasketch_frequent_items(8, country_code),\n         'NO_FALSE_POSITIVES'\n       ) AS heavy_hitters\nFROM page_views;"}],"relatedNames":["datasketch_frequent_items_get_frequent","datasketch_frequent_items_estimate","datasketch_frequent_items_lower_bound","datasketch_frequent_items_upper_bound"]},"datasketch_frequent_items_epsilon(sketch_frequent_items)":{"name":"datasketch_frequent_items_epsilon","type":"scalar","categories":["Frequent Items"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""}],"description":"Returns the epsilon value (relative error) of the sketch","examples":[{"description":"","code":"SELECT datasketch_frequent_items_epsilon(sketch);"}],"relatedNames":["datasketch_frequent_items"]},"datasketch_frequent_items_estimate(sketch_frequent_items,UBIGINT)":{"name":"datasketch_frequent_items_estimate","type":"scalar","categories":["Frequent Items"],"returnType":"BIGINT","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""},{"name":"col1","type":"UBIGINT | BIGINT | SMALLINT | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","VARCHAR"]}],"description":"Estimated frequency for a specific item.","examples":[{"description":"","code":"SELECT datasketch_frequent_items_estimate(sketch, 'item');"}],"relatedNames":["datasketch_frequent_items","datasketch_frequent_items_get_frequent"]},"datasketch_frequent_items_get_frequent(sketch_frequent_items,VARCHAR)":{"name":"datasketch_frequent_items_get_frequent","type":"scalar","categories":["Frequent Items"],"returnType":"STRUCT(item VARCHAR, estimate BIGINT, lower_bound BIGINT, upper_bound BIGINT)[]","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""},{"name":"col1","type":"VARCHAR","paramType":"positional","description":""}],"description":"Return the heavy-hitter candidates with per-item estimate, lower bound, and upper bound. The second argument selects the error mode: `'NO_FALSE_POSITIVES'` returns only items that are *definitely* heavy (every returned item really is frequent); `'NO_FALSE_NEGATIVES'` returns the union of all candidates that *might* be — every truly-frequent item is included, plus some that may not be.","examples":[{"description":"","code":"SELECT datasketch_frequent_items_get_frequent(sketch, 'NO_FALSE_POSITIVES');"}],"relatedNames":["datasketch_frequent_items","datasketch_frequent_items_estimate","datasketch_frequent_items_lower_bound","datasketch_frequent_items_upper_bound"]},"datasketch_frequent_items_is_empty(sketch_frequent_items)":{"name":"datasketch_frequent_items_is_empty","type":"scalar","categories":["Frequent Items"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""}],"description":"Returns true if the sketch is empty","examples":[{"description":"","code":"SELECT datasketch_frequent_items_is_empty(sketch);"}],"relatedNames":["datasketch_frequent_items"]},"datasketch_frequent_items_lower_bound(sketch_frequent_items,TINYINT)":{"name":"datasketch_frequent_items_lower_bound","type":"scalar","categories":["Frequent Items"],"returnType":"BIGINT","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""},{"name":"col1","type":"TINYINT | FLOAT | UTINYINT | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","VARCHAR"]}],"description":"Returns the lower bound frequency estimate for a specific item","examples":[{"description":"","code":"SELECT datasketch_frequent_items_lower_bound(sketch, 'item');"}],"relatedNames":["datasketch_frequent_items","datasketch_frequent_items_upper_bound"]},"datasketch_frequent_items_num_active(sketch_frequent_items)":{"name":"datasketch_frequent_items_num_active","type":"scalar","categories":["Frequent Items"],"returnType":"BIGINT","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""}],"description":"Returns the number of active items currently tracked by the sketch","examples":[{"description":"","code":"SELECT datasketch_frequent_items_num_active(sketch);"}],"relatedNames":["datasketch_frequent_items"]},"datasketch_frequent_items_total_weight(sketch_frequent_items)":{"name":"datasketch_frequent_items_total_weight","type":"scalar","categories":["Frequent Items"],"returnType":"BIGINT","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""}],"description":"Returns the total weight (sum of all item counts) processed by the sketch","examples":[{"description":"","code":"SELECT datasketch_frequent_items_total_weight(sketch);"}],"relatedNames":["datasketch_frequent_items"]},"datasketch_frequent_items_upper_bound(sketch_frequent_items,UTINYINT)":{"name":"datasketch_frequent_items_upper_bound","type":"scalar","categories":["Frequent Items"],"returnType":"BIGINT","parameters":[{"name":"col0","type":"sketch_frequent_items","paramType":"positional","description":""},{"name":"col1","type":"UTINYINT | SMALLINT | INTEGER | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","VARCHAR"]}],"description":"Returns the upper bound frequency estimate for a specific item","examples":[{"description":"","code":"SELECT datasketch_frequent_items_upper_bound(sketch, 'item');"}],"relatedNames":["datasketch_frequent_items","datasketch_frequent_items_lower_bound"]},"datasketch_hll(INTEGER,TINYINT)":{"name":"datasketch_hll","type":"aggregate","categories":["HLL"],"returnType":"sketch_hll","parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"TINYINT | INTEGER | UTINYINT | …","paramType":"positional","description":"","typeUnion":["BIGINT","BLOB","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","VARCHAR"]}],"description":"Aggregate input values into a HyperLogLog sketch for distinct counting. Returns a `sketch_hll` BLOB you can persist, ship between processes, or merge later. The first argument is `lg_k` — base-2 log of the number of buckets — which controls the size/accuracy trade-off. `lg_k = 12` (4096 buckets, ~4 KB sketch, ~1.6% standard error) is a common default; raise it for tighter bounds, lower it for smaller sketches.","examples":[{"description":"Approximate distinct users (lg_k = 12, ~1.6% error)","code":"SELECT datasketch_hll_estimate(datasketch_hll(12, user_id)) AS distinct_users\nFROM events;"},{"description":"Build per-day sketches and persist them","code":"CREATE TABLE daily_uniques (day DATE, hll sketch_hll);\nINSERT INTO daily_uniques\nSELECT date_trunc('day', ts) AS day,\n       datasketch_hll(12, user_id) AS hll\nFROM events\nGROUP BY 1;"}],"relatedNames":["datasketch_hll_estimate","datasketch_hll_union","datasketch_hll_lower_bound","datasketch_hll_upper_bound","datasketch_hll_describe"]},"datasketch_hll_describe(sketch_hll,BOOLEAN,BOOLEAN)":{"name":"datasketch_hll_describe","type":"scalar","categories":["HLL"],"returnType":"VARCHAR","parameters":[{"name":"col0","type":"sketch_hll","paramType":"positional","description":""},{"name":"col1","type":"BOOLEAN","paramType":"positional","description":""},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return a string representation of the sketch","examples":[{"description":"","code":"SELECT datasketch_hll_describe(sketch, include_summary, include_detail);"}],"relatedNames":["datasketch_hll","datasketch_hll_estimate"]},"datasketch_hll_estimate(sketch_hll)":{"name":"datasketch_hll_estimate","type":"scalar","categories":["HLL"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_hll","paramType":"positional","description":""}],"description":"Read the estimated distinct count from an HLL sketch. Returns a `DOUBLE` — the cardinality estimate.","examples":[{"description":"","code":"SELECT datasketch_hll_estimate(sketch);"}],"relatedNames":["datasketch_hll","datasketch_hll_union","datasketch_hll_lower_bound","datasketch_hll_upper_bound"]},"datasketch_hll_is_compact(sketch_hll)":{"name":"datasketch_hll_is_compact","type":"scalar","categories":["HLL"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"sketch_hll","paramType":"positional","description":""}],"description":"Return whether the sketch is in compact form","examples":[{"description":"","code":"SELECT datasketch_hll_is_compact(sketch);"}],"relatedNames":["datasketch_hll"]},"datasketch_hll_is_empty(sketch_hll)":{"name":"datasketch_hll_is_empty","type":"scalar","categories":["HLL"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"sketch_hll","paramType":"positional","description":""}],"description":"Return a boolean indicating if the sketch is empty","examples":[{"description":"","code":"SELECT datasketch_hll_is_empty(sketch);"}],"relatedNames":["datasketch_hll"]},"datasketch_hll_lg_config_k(sketch_hll)":{"name":"datasketch_hll_lg_config_k","type":"scalar","categories":["HLL"],"returnType":"UTINYINT","parameters":[{"name":"col0","type":"sketch_hll","paramType":"positional","description":""}],"description":"Return the value of log base 2 K for this sketch","examples":[{"description":"","code":"SELECT datasketch_hll_lg_config_k(sketch);"}],"relatedNames":["datasketch_hll"]},"datasketch_hll_lower_bound(sketch_hll,UTINYINT)":{"name":"datasketch_hll_lower_bound","type":"scalar","categories":["HLL"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_hll","paramType":"positional","description":""},{"name":"col1","type":"UTINYINT","paramType":"positional","description":""}],"description":"Lower bound of the HLL distinct-count estimate at a given number of standard deviations.","examples":[{"description":"","code":"SELECT datasketch_hll_lower_bound(sketch, std_dev);"}],"relatedNames":["datasketch_hll","datasketch_hll_estimate","datasketch_hll_upper_bound"]},"datasketch_hll_union(INTEGER,sketch_hll)":{"name":"datasketch_hll_union","type":"aggregate","categories":["HLL"],"returnType":"sketch_hll","parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"sketch_hll","paramType":"positional","description":""}],"description":"Merge multiple HLL sketches into one. Aggregate over a column of `sketch_hll` BLOBs to roll per-partition or per-day sketches up to whatever window you need — without rescanning the underlying rows. The leading `lg_k` argument is the precision of the output sketch.","examples":[{"description":"Rolling 7-day distinct users from per-day sketches","code":"SELECT datasketch_hll_estimate(datasketch_hll_union(12, hll)) AS uniques_last_7d\nFROM daily_uniques\nWHERE day >= CURRENT_DATE - 7;"}],"relatedNames":["datasketch_hll","datasketch_hll_estimate"]},"datasketch_hll_upper_bound(sketch_hll,UTINYINT)":{"name":"datasketch_hll_upper_bound","type":"scalar","categories":["HLL"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_hll","paramType":"positional","description":""},{"name":"col1","type":"UTINYINT","paramType":"positional","description":""}],"description":"Upper bound of the HLL distinct-count estimate at a given number of standard deviations.","examples":[{"description":"","code":"SELECT datasketch_hll_upper_bound(sketch, std_dev);"}],"relatedNames":["datasketch_hll","datasketch_hll_estimate","datasketch_hll_lower_bound"]},"datasketch_kll(INTEGER,sketch_kll_bigint)":{"name":"datasketch_kll","type":"aggregate","categories":["KLL"],"returnType":"<sketch>","returnTypeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"],"parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"sketch_kll_bigint | sketch_kll_double | sketch_kll_usmallint | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Aggregate input values into a KLL quantile sketch. Best balance of accuracy, speed, and size — the modern default for general-purpose quantile estimation. The first argument `K` controls accuracy: higher K → smaller error and bigger sketch. `K = 200` is a sensible production starting point.","examples":[{"description":"p50 / p95 / p99 latency from one KLL sketch","code":"WITH agg AS (\n  SELECT datasketch_kll(200, latency_ms) AS sketch FROM requests\n)\nSELECT datasketch_kll_quantile(sketch, 0.50, true) AS p50,\n       datasketch_kll_quantile(sketch, 0.95, true) AS p95,\n       datasketch_kll_quantile(sketch, 0.99, true) AS p99\nFROM agg;"}],"relatedNames":["datasketch_kll_quantile","datasketch_kll_rank","datasketch_kll_cdf","datasketch_kll_pmf","datasketch_kll_normalized_rank_error"]},"datasketch_kll_cdf(sketch_kll_float,FLOAT[],BOOLEAN)":{"name":"datasketch_kll_cdf","type":"scalar","categories":["KLL"],"returnType":"<numeric>[]","returnTypeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"CDF over a list of split points — one call returns the cumulative rank at each. Useful for histograms.","examples":[{"description":"","code":"SELECT datasketch_kll_cdf(sketch, points, inclusive);"}],"relatedNames":["datasketch_kll","datasketch_kll_pmf"]},"datasketch_kll_describe(sketch_kll_ubigint,BOOLEAN,BOOLEAN)":{"name":"datasketch_kll_describe","type":"scalar","categories":["KLL"],"returnType":"VARCHAR","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]},{"name":"col1","type":"BOOLEAN","paramType":"positional","description":""},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return a description of this sketch","examples":[{"description":"","code":"SELECT datasketch_kll_describe(sketch, include_levels, include_items);"}],"relatedNames":["datasketch_kll"]},"datasketch_kll_is_empty(sketch_kll_tinyint)":{"name":"datasketch_kll_is_empty","type":"scalar","categories":["KLL"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Return a boolean indicating if the sketch is empty","examples":[{"description":"","code":"SELECT datasketch_kll_is_empty(sketch);"}],"relatedNames":["datasketch_kll"]},"datasketch_kll_is_estimation_mode(sketch_kll_bigint)":{"name":"datasketch_kll_is_estimation_mode","type":"scalar","categories":["KLL"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Return a boolean indicating if the sketch is in estimation mode","examples":[{"description":"","code":"SELECT datasketch_kll_is_estimation_mode(sketch);"}],"relatedNames":["datasketch_kll"]},"datasketch_kll_k(sketch_kll_utinyint)":{"name":"datasketch_kll_k","type":"scalar","categories":["KLL"],"returnType":"USMALLINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Return the value of K for this sketch","examples":[{"description":"","code":"SELECT datasketch_kll_k(sketch);"}],"relatedNames":["datasketch_kll"]},"datasketch_kll_max_item(sketch_kll_integer)":{"name":"datasketch_kll_max_item","type":"scalar","categories":["KLL"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Return the maxium item in the sketch","examples":[{"description":"","code":"SELECT datasketch_kll_max_item(sketch);"}],"relatedNames":["datasketch_kll","datasketch_kll_min_item"]},"datasketch_kll_min_item(sketch_kll_tinyint)":{"name":"datasketch_kll_min_item","type":"scalar","categories":["KLL"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Return the minimum item in the sketch","examples":[{"description":"","code":"SELECT datasketch_kll_min_item(sketch);"}],"relatedNames":["datasketch_kll","datasketch_kll_max_item"]},"datasketch_kll_n(sketch_kll_bigint)":{"name":"datasketch_kll_n","type":"scalar","categories":["KLL"],"returnType":"UBIGINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Return the number of items contained in the sketch","examples":[{"description":"","code":"SELECT datasketch_kll_rank(sketch);"}],"relatedNames":["datasketch_kll"]},"datasketch_kll_normalized_rank_error(sketch_kll_integer,BOOLEAN)":{"name":"datasketch_kll_normalized_rank_error","type":"scalar","categories":["KLL"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]},{"name":"col1","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return the normalized rank error of the sketch","examples":[{"description":"","code":"SELECT datasketch_kll_normalized_rank_error(sketch, is_pmf);"}],"relatedNames":["datasketch_kll"]},"datasketch_kll_num_retained(sketch_kll_uinteger)":{"name":"datasketch_kll_num_retained","type":"scalar","categories":["KLL"],"returnType":"UBIGINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]}],"description":"Return the number of retained items in the sketch","examples":[{"description":"","code":"SELECT datasketch_kll_num_retained(sketch);"}],"relatedNames":["datasketch_kll"]},"datasketch_kll_pmf(sketch_kll_float,FLOAT[],BOOLEAN)":{"name":"datasketch_kll_pmf","type":"scalar","categories":["KLL"],"returnType":"<numeric>[]","returnTypeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"PMF (probability mass) over a list of split points — fraction of the distribution falling in each bucket.","examples":[{"description":"","code":"SELECT datasketch_kll_pmf(sketch, points, inclusive);"}],"relatedNames":["datasketch_kll","datasketch_kll_cdf"]},"datasketch_kll_quantile(sketch_kll_float,DOUBLE,BOOLEAN)":{"name":"datasketch_kll_quantile","type":"scalar","categories":["KLL"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]},{"name":"col1","type":"DOUBLE","paramType":"positional","description":""},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Approximate quantile at a given rank — given a sketch and `r ∈ [0, 1]`, returns the value at that rank in the sorted distribution.","examples":[{"description":"","code":"SELECT datasketch_kll_rank(sketch, rank, inclusive);"}],"relatedNames":["datasketch_kll","datasketch_kll_rank","datasketch_kll_cdf"]},"datasketch_kll_rank(sketch_kll_tinyint,TINYINT,BOOLEAN)":{"name":"datasketch_kll_rank","type":"scalar","categories":["KLL"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_kll_bigint","sketch_kll_double","sketch_kll_float","sketch_kll_integer","sketch_kll_smallint","sketch_kll_tinyint","sketch_kll_ubigint","sketch_kll_uinteger","sketch_kll_usmallint","sketch_kll_utinyint"]},{"name":"col1","type":"<numeric>","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Inverse of `datasketch_kll_quantile` — given a value, return its approximate rank `r ∈ [0, 1]` in the sorted distribution.","examples":[{"description":"","code":"SELECT datasketch_kll_rank(sketch, item, inclusive);"}],"relatedNames":["datasketch_kll","datasketch_kll_quantile"]},"datasketch_quantiles(INTEGER,INTEGER)":{"name":"datasketch_quantiles","type":"aggregate","categories":["Quantiles"],"returnType":"<sketch>","returnTypeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"],"parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"INTEGER | DOUBLE | UINTEGER | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Aggregate input values into the classic mergeable quantiles sketch from the original DataSketches paper. Solid general-purpose choice supporting all numeric input types; for new projects prefer `datasketch_kll`, which gives the same merge semantics with better accuracy/size trade-off.","examples":[{"description":"","code":"SELECT datasketch_quantiles(k, data);"}],"relatedNames":["datasketch_quantiles_quantile","datasketch_quantiles_rank","datasketch_quantiles_cdf","datasketch_quantiles_pmf"]},"datasketch_quantiles_cdf(sketch_quantiles_utinyint,UTINYINT[],BOOLEAN)":{"name":"datasketch_quantiles_cdf","type":"scalar","categories":["Quantiles"],"returnType":"<numeric>[]","returnTypeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return the Cumulative Distribution Function (CDF) of the sketch for a series of points","examples":[{"description":"","code":"SELECT datasketch_quantiles_cdf(sketch, points, inclusive);"}],"relatedNames":["datasketch_quantiles","datasketch_quantiles_pmf"]},"datasketch_quantiles_describe(sketch_quantiles_smallint,BOOLEAN,BOOLEAN)":{"name":"datasketch_quantiles_describe","type":"scalar","categories":["Quantiles"],"returnType":"VARCHAR","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]},{"name":"col1","type":"BOOLEAN","paramType":"positional","description":""},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return a description of this sketch","examples":[{"description":"","code":"SELECT datasketch_quantiles_describe(sketch, include_levels, include_items);"}],"relatedNames":["datasketch_quantiles"]},"datasketch_quantiles_is_empty(sketch_quantiles_smallint)":{"name":"datasketch_quantiles_is_empty","type":"scalar","categories":["Quantiles"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Return a boolean indicating if the sketch is empty","examples":[{"description":"","code":"SELECT datasketch_quantiles_is_empty(sketch);"}],"relatedNames":["datasketch_quantiles"]},"datasketch_quantiles_is_estimation_mode(sketch_quantiles_smallint)":{"name":"datasketch_quantiles_is_estimation_mode","type":"scalar","categories":["Quantiles"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Return a boolean indicating if the sketch is in estimation mode","examples":[{"description":"","code":"SELECT datasketch_quantiles_is_estimation_mode(sketch);"}],"relatedNames":["datasketch_quantiles"]},"datasketch_quantiles_k(sketch_quantiles_double)":{"name":"datasketch_quantiles_k","type":"scalar","categories":["Quantiles"],"returnType":"USMALLINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Return the value of K for this sketch","examples":[{"description":"","code":"SELECT datasketch_quantiles_k(sketch);"}],"relatedNames":["datasketch_quantiles"]},"datasketch_quantiles_max_item(sketch_quantiles_integer)":{"name":"datasketch_quantiles_max_item","type":"scalar","categories":["Quantiles"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Return the maxium item in the sketch","examples":[{"description":"","code":"SELECT datasketch_quantiles_max_item(sketch);"}],"relatedNames":["datasketch_quantiles","datasketch_quantiles_min_item"]},"datasketch_quantiles_min_item(sketch_quantiles_ubigint)":{"name":"datasketch_quantiles_min_item","type":"scalar","categories":["Quantiles"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Return the minimum item in the sketch","examples":[{"description":"","code":"SELECT datasketch_quantiles_min_item(sketch);"}],"relatedNames":["datasketch_quantiles","datasketch_quantiles_max_item"]},"datasketch_quantiles_n(sketch_quantiles_ubigint)":{"name":"datasketch_quantiles_n","type":"scalar","categories":["Quantiles"],"returnType":"UBIGINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Return the number of items contained in the sketch","examples":[{"description":"","code":"SELECT datasketch_quantiles_rank(sketch);"}],"relatedNames":["datasketch_quantiles"]},"datasketch_quantiles_normalized_rank_error(sketch_quantiles_bigint,BOOLEAN)":{"name":"datasketch_quantiles_normalized_rank_error","type":"scalar","categories":["Quantiles"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]},{"name":"col1","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return the normalized rank error of the sketch","examples":[{"description":"","code":"SELECT datasketch_quantiles_normalized_rank_error(sketch, is_pmf);"}],"relatedNames":["datasketch_quantiles"]},"datasketch_quantiles_num_retained(sketch_quantiles_uinteger)":{"name":"datasketch_quantiles_num_retained","type":"scalar","categories":["Quantiles"],"returnType":"UBIGINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]}],"description":"Return the number of retained items in the sketch","examples":[{"description":"","code":"SELECT datasketch_quantiles_num_retained(sketch);"}],"relatedNames":["datasketch_quantiles"]},"datasketch_quantiles_pmf(sketch_quantiles_double,DOUBLE[],BOOLEAN)":{"name":"datasketch_quantiles_pmf","type":"scalar","categories":["Quantiles"],"returnType":"<numeric>[]","returnTypeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return the Probability Mass Function (PMF) of the sketch for a series of points","examples":[{"description":"","code":"SELECT datasketch_quantiles_pmf(sketch, points, inclusive);"}],"relatedNames":["datasketch_quantiles","datasketch_quantiles_cdf"]},"datasketch_quantiles_quantile(sketch_quantiles_double,DOUBLE,BOOLEAN)":{"name":"datasketch_quantiles_quantile","type":"scalar","categories":["Quantiles"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]},{"name":"col1","type":"DOUBLE","paramType":"positional","description":""},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Approximate quantile at a given rank from a classic Quantiles sketch.","examples":[{"description":"","code":"SELECT datasketch_quantiles_rank(sketch, rank, inclusive);"}],"relatedNames":["datasketch_quantiles","datasketch_quantiles_rank"]},"datasketch_quantiles_rank(sketch_quantiles_double,DOUBLE,BOOLEAN)":{"name":"datasketch_quantiles_rank","type":"scalar","categories":["Quantiles"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_quantiles_bigint","sketch_quantiles_double","sketch_quantiles_float","sketch_quantiles_integer","sketch_quantiles_smallint","sketch_quantiles_tinyint","sketch_quantiles_ubigint","sketch_quantiles_uinteger","sketch_quantiles_usmallint","sketch_quantiles_utinyint"]},{"name":"col1","type":"<numeric>","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Approximate rank of a value within the classic Quantiles sketch.","examples":[{"description":"","code":"SELECT datasketch_quantiles_rank(sketch, item, inclusive);"}],"relatedNames":["datasketch_quantiles","datasketch_quantiles_quantile"]},"datasketch_req(INTEGER,sketch_req_bigint)":{"name":"datasketch_req","type":"aggregate","categories":["REQ"],"returnType":"<sketch>","returnTypeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"],"parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"sketch_req_bigint | TINYINT | sketch_req_double | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT","sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Aggregate input values into a Relative Error Quantile sketch. Error scales with rank rather than being a fixed fraction of `n` — predictable accuracy on highly skewed distributions where a fixed-error sketch over- or under-spends precision at the extremes.","examples":[{"description":"","code":"SELECT datasketch_req(k, data);"}],"relatedNames":["datasketch_req_quantile","datasketch_req_rank","datasketch_req_cdf","datasketch_req_pmf"]},"datasketch_req_cdf(sketch_req_tinyint,TINYINT[],BOOLEAN)":{"name":"datasketch_req_cdf","type":"scalar","categories":["REQ"],"returnType":"<numeric>[]","returnTypeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return the Cumulative Distribution Function (CDF) of the sketch for a series of points","examples":[{"description":"","code":"SELECT datasketch_req_cdf(sketch, points, inclusive);"}],"relatedNames":["datasketch_req","datasketch_req_pmf"]},"datasketch_req_describe(sketch_req_tinyint,BOOLEAN,BOOLEAN)":{"name":"datasketch_req_describe","type":"scalar","categories":["REQ"],"returnType":"VARCHAR","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]},{"name":"col1","type":"BOOLEAN","paramType":"positional","description":""},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return a description of this sketch","examples":[{"description":"","code":"SELECT datasketch_req_describe(sketch, include_levels, include_items);"}],"relatedNames":["datasketch_req"]},"datasketch_req_is_empty(sketch_req_tinyint)":{"name":"datasketch_req_is_empty","type":"scalar","categories":["REQ"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Return a boolean indicating if the sketch is empty","examples":[{"description":"","code":"SELECT datasketch_req_is_empty(sketch);"}],"relatedNames":["datasketch_req"]},"datasketch_req_is_estimation_mode(sketch_req_integer)":{"name":"datasketch_req_is_estimation_mode","type":"scalar","categories":["REQ"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Return a boolean indicating if the sketch is in estimation mode","examples":[{"description":"","code":"SELECT datasketch_req_is_estimation_mode(sketch);"}],"relatedNames":["datasketch_req"]},"datasketch_req_k(sketch_req_tinyint)":{"name":"datasketch_req_k","type":"scalar","categories":["REQ"],"returnType":"USMALLINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Return the value of K for this sketch","examples":[{"description":"","code":"SELECT datasketch_req_k(sketch);"}],"relatedNames":["datasketch_req"]},"datasketch_req_max_item(sketch_req_utinyint)":{"name":"datasketch_req_max_item","type":"scalar","categories":["REQ"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Return the maxium item in the sketch","examples":[{"description":"","code":"SELECT datasketch_req_max_item(sketch);"}],"relatedNames":["datasketch_req","datasketch_req_min_item"]},"datasketch_req_min_item(sketch_req_smallint)":{"name":"datasketch_req_min_item","type":"scalar","categories":["REQ"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Return the minimum item in the sketch","examples":[{"description":"","code":"SELECT datasketch_req_min_item(sketch);"}],"relatedNames":["datasketch_req","datasketch_req_max_item"]},"datasketch_req_n(sketch_req_bigint)":{"name":"datasketch_req_n","type":"scalar","categories":["REQ"],"returnType":"UBIGINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Return the number of items contained in the sketch","examples":[{"description":"","code":"SELECT datasketch_req_rank(sketch);"}],"relatedNames":["datasketch_req"]},"datasketch_req_num_retained(sketch_req_double)":{"name":"datasketch_req_num_retained","type":"scalar","categories":["REQ"],"returnType":"UBIGINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]}],"description":"Return the number of retained items in the sketch","examples":[{"description":"","code":"SELECT datasketch_req_num_retained(sketch);"}],"relatedNames":["datasketch_req"]},"datasketch_req_pmf(sketch_req_float,FLOAT[],BOOLEAN)":{"name":"datasketch_req_pmf","type":"scalar","categories":["REQ"],"returnType":"<numeric>[]","returnTypeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["BIGINT[]","DOUBLE[]","FLOAT[]","INTEGER[]","SMALLINT[]","TINYINT[]","UBIGINT[]","UINTEGER[]","USMALLINT[]","UTINYINT[]"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return the Probability Mass Function (PMF) of the sketch for a series of points","examples":[{"description":"","code":"SELECT datasketch_req_pmf(sketch, points, inclusive);"}],"relatedNames":["datasketch_req","datasketch_req_cdf"]},"datasketch_req_quantile(sketch_req_tinyint,DOUBLE,BOOLEAN)":{"name":"datasketch_req_quantile","type":"scalar","categories":["REQ"],"returnType":"<numeric>","returnTypeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]},{"name":"col1","type":"DOUBLE","paramType":"positional","description":""},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Approximate quantile at a given rank from a REQ sketch.","examples":[{"description":"","code":"SELECT datasketch_req_rank(sketch, rank, inclusive);"}],"relatedNames":["datasketch_req","datasketch_req_rank"]},"datasketch_req_rank(sketch_req_smallint,SMALLINT,BOOLEAN)":{"name":"datasketch_req_rank","type":"scalar","categories":["REQ"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_req_bigint","sketch_req_double","sketch_req_float","sketch_req_integer","sketch_req_smallint","sketch_req_tinyint","sketch_req_ubigint","sketch_req_uinteger","sketch_req_usmallint","sketch_req_utinyint"]},{"name":"col1","type":"<numeric>","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","UBIGINT","UINTEGER","USMALLINT","UTINYINT"]},{"name":"col2","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Approximate rank of a value within the REQ sketch.","examples":[{"description":"","code":"SELECT datasketch_req_rank(sketch, item, inclusive);"}],"relatedNames":["datasketch_req","datasketch_req_quantile"]},"datasketch_tdigest(INTEGER,sketch_tdigest_float)":{"name":"datasketch_tdigest","type":"aggregate","categories":["TDigest"],"returnType":"<sketch>","returnTypeUnion":["sketch_tdigest_double","sketch_tdigest_float"],"parameters":[{"name":"col0","type":"INTEGER","paramType":"positional","description":""},{"name":"col1","type":"sketch_tdigest_float | sketch_tdigest_double | DOUBLE | FLOAT","paramType":"positional","description":"","typeUnion":["DOUBLE","FLOAT","sketch_tdigest_double","sketch_tdigest_float"]}],"description":"Aggregate input values into a t-digest quantile sketch — most accurate at the tails (p99, p999), exactly where SLOs live. FLOAT/DOUBLE input only. The first argument controls the centroid budget; larger sketches give tighter tail estimates.","examples":[{"description":"Tail latency","code":"SELECT datasketch_tdigest_quantile(\n         datasketch_tdigest(100, latency_ms), 0.999\n       ) AS p999\nFROM requests;"}],"relatedNames":["datasketch_tdigest_quantile","datasketch_tdigest_rank","datasketch_tdigest_cdf","datasketch_tdigest_pmf"]},"datasketch_tdigest_cdf(sketch_tdigest_float,FLOAT[])":{"name":"datasketch_tdigest_cdf","type":"scalar","categories":["TDigest"],"returnType":"<numeric>[]","returnTypeUnion":["DOUBLE[]","FLOAT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["DOUBLE[]","FLOAT[]"]}],"description":"Return the Cumulative Distribution Function (CDF) of the sketch for a series of points","examples":[{"description":"","code":"SELECT datasketch_tdigest_cdf(sketch, points);"}],"relatedNames":["datasketch_tdigest","datasketch_tdigest_pmf"]},"datasketch_tdigest_describe(sketch_tdigest_double,BOOLEAN)":{"name":"datasketch_tdigest_describe","type":"scalar","categories":["TDigest"],"returnType":"VARCHAR","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]},{"name":"col1","type":"BOOLEAN","paramType":"positional","description":""}],"description":"Return a description of this sketch","examples":[{"description":"","code":"SELECT datasketch_tdigest_describe(sketch, include_centroids);"}],"relatedNames":["datasketch_tdigest"]},"datasketch_tdigest_is_empty(sketch_tdigest_double)":{"name":"datasketch_tdigest_is_empty","type":"scalar","categories":["TDigest"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]}],"description":"Return a boolean indicating if the sketch is empty","examples":[{"description":"","code":"SELECT datasketch_tdigest_is_empty(sketch);"}],"relatedNames":["datasketch_tdigest"]},"datasketch_tdigest_k(sketch_tdigest_double)":{"name":"datasketch_tdigest_k","type":"scalar","categories":["TDigest"],"returnType":"USMALLINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]}],"description":"Return the value of K for this sketch","examples":[{"description":"","code":"SELECT datasketch_tdigest_k(sketch);"}],"relatedNames":["datasketch_tdigest"]},"datasketch_tdigest_pmf(sketch_tdigest_double,DOUBLE[])":{"name":"datasketch_tdigest_pmf","type":"scalar","categories":["TDigest"],"returnType":"<numeric>[]","returnTypeUnion":["DOUBLE[]","FLOAT[]"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]},{"name":"col1","type":"<numeric>[]","paramType":"positional","description":"","typeUnion":["DOUBLE[]","FLOAT[]"]}],"description":"Return the Probability Mass Function (PMF) of the sketch for a series of points","examples":[{"description":"","code":"SELECT datasketch_tdigest_pmf(sketch, points);"}],"relatedNames":["datasketch_tdigest","datasketch_tdigest_cdf"]},"datasketch_tdigest_quantile(sketch_tdigest_float,DOUBLE)":{"name":"datasketch_tdigest_quantile","type":"scalar","categories":["TDigest"],"returnType":"<numeric>","returnTypeUnion":["DOUBLE","FLOAT"],"parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]},{"name":"col1","type":"DOUBLE","paramType":"positional","description":""}],"description":"Approximate quantile at a given rank from a t-digest sketch.","examples":[{"description":"","code":"SELECT datasketch_tdigest_quantile(sketch, rank);"}],"relatedNames":["datasketch_tdigest","datasketch_tdigest_rank"]},"datasketch_tdigest_rank(sketch_tdigest_float,FLOAT)":{"name":"datasketch_tdigest_rank","type":"scalar","categories":["TDigest"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]},{"name":"col1","type":"<numeric>","paramType":"positional","description":"","typeUnion":["DOUBLE","FLOAT"]}],"description":"Approximate rank of a value within the t-digest sketch.","examples":[{"description":"","code":"SELECT datasketch_tdigest_rank(sketch, item);"}],"relatedNames":["datasketch_tdigest","datasketch_tdigest_quantile"]},"datasketch_tdigest_total_weight(sketch_tdigest_float)":{"name":"datasketch_tdigest_total_weight","type":"scalar","categories":["TDigest"],"returnType":"UBIGINT","parameters":[{"name":"col0","type":"<sketch>","paramType":"positional","description":"","typeUnion":["sketch_tdigest_double","sketch_tdigest_float"]}],"description":"Return the total weight of this sketch","examples":[{"description":"","code":"SELECT datasketch_tdigest_total_weight(sketch);"}],"relatedNames":["datasketch_tdigest"]},"datasketch_theta(VARCHAR)":{"name":"datasketch_theta","type":"aggregate","categories":["Theta"],"returnType":"sketch_theta","parameters":[{"name":"col0","type":"VARCHAR | FLOAT | TINYINT | …","paramType":"positional","description":"","typeUnion":["BIGINT","DOUBLE","FLOAT","INTEGER","SMALLINT","TINYINT","VARCHAR","sketch_theta"]}],"description":"Aggregate input values into a Theta sketch — the distinct-count family that supports set operations (union, intersect, A-not-B) beyond simple merge. The leading `lg_k` is base-2 log of the nominal sketch entries.","examples":[{"description":"Build per-cohort sketches","code":"SELECT cohort,\n       datasketch_theta(12, user_id) AS sketch\nFROM events\nGROUP BY cohort;"}],"relatedNames":["datasketch_theta_estimate","datasketch_theta_union","datasketch_theta_intersect","datasketch_theta_a_not_b"]},"datasketch_theta_a_not_b(sketch_theta,sketch_theta)":{"name":"datasketch_theta_a_not_b","type":"scalar","categories":["Theta"],"returnType":"sketch_theta","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""},{"name":"col1","type":"sketch_theta","paramType":"positional","description":""}],"description":"Approximate `|A \\ B|` — distinct items present in A but not in B. Useful for churn (in-Jan, not-in-Feb) and new-user (in-Feb, not-in-Jan) measurements directly from sketch state.","examples":[{"description":"","code":"SELECT datasketch_theta_a_not_b(sketch_a, sketch_b);"}],"relatedNames":["datasketch_theta","datasketch_theta_union","datasketch_theta_intersect"]},"datasketch_theta_describe(sketch_theta)":{"name":"datasketch_theta_describe","type":"scalar","categories":["Theta"],"returnType":"VARCHAR","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""}],"description":"Returns a human-readable description of the Theta sketch","examples":[{"description":"","code":"SELECT datasketch_theta_describe(sketch);"}],"relatedNames":["datasketch_theta"]},"datasketch_theta_estimate(sketch_theta)":{"name":"datasketch_theta_estimate","type":"scalar","categories":["Theta"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""}],"description":"Read the estimated distinct count from a Theta sketch.","examples":[{"description":"","code":"SELECT datasketch_theta_estimate(sketch);"}],"relatedNames":["datasketch_theta","datasketch_theta_lower_bound","datasketch_theta_upper_bound"]},"datasketch_theta_get_seed(sketch_theta)":{"name":"datasketch_theta_get_seed","type":"scalar","categories":["Theta"],"returnType":"BIGINT","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""}],"description":"Returns the seed hash used by the sketch","examples":[{"description":"","code":"SELECT datasketch_theta_get_seed(sketch);"}],"relatedNames":["datasketch_theta"]},"datasketch_theta_get_theta(sketch_theta)":{"name":"datasketch_theta_get_theta","type":"scalar","categories":["Theta"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""}],"description":"Returns the theta value of the sketch (sampling probability)","examples":[{"description":"","code":"SELECT datasketch_theta_get_theta(sketch);"}],"relatedNames":["datasketch_theta"]},"datasketch_theta_intersect(sketch_theta,sketch_theta)":{"name":"datasketch_theta_intersect","type":"scalar","categories":["Theta"],"returnType":"sketch_theta","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""},{"name":"col1","type":"sketch_theta","paramType":"positional","description":""}],"description":"Approximate `|A ∩ B|` — distinct items present in both cohorts. The classic use case is funnel and retention analysis: how many users in segment A also appear in segment B, computed from the sketches alone.","examples":[{"description":"Retention — users active in Jan AND Feb","code":"WITH a AS (SELECT datasketch_theta(12, user_id) AS s FROM events_jan),\n     b AS (SELECT datasketch_theta(12, user_id) AS s FROM events_feb)\nSELECT datasketch_theta_estimate(\n         datasketch_theta_intersect(a.s, b.s)\n       ) AS retained_users\nFROM a, b;"}],"relatedNames":["datasketch_theta","datasketch_theta_union","datasketch_theta_a_not_b"]},"datasketch_theta_is_empty(sketch_theta)":{"name":"datasketch_theta_is_empty","type":"scalar","categories":["Theta"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""}],"description":"Returns true if the Theta sketch is empty","examples":[{"description":"","code":"SELECT datasketch_theta_is_empty(sketch);"}],"relatedNames":["datasketch_theta"]},"datasketch_theta_is_estimation_mode(sketch_theta)":{"name":"datasketch_theta_is_estimation_mode","type":"scalar","categories":["Theta"],"returnType":"BOOLEAN","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""}],"description":"Returns true if the sketch is in estimation mode (has exceeded exact counting capacity)","examples":[{"description":"","code":"SELECT datasketch_theta_is_estimation_mode(sketch);"}],"relatedNames":["datasketch_theta"]},"datasketch_theta_lower_bound(sketch_theta,INTEGER)":{"name":"datasketch_theta_lower_bound","type":"scalar","categories":["Theta"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""},{"name":"col1","type":"INTEGER","paramType":"positional","description":""}],"description":"Returns the lower bound estimate at the given number of standard deviations (1, 2, or 3)","examples":[{"description":"","code":"SELECT datasketch_theta_lower_bound(sketch, 2);"}],"relatedNames":["datasketch_theta","datasketch_theta_upper_bound"]},"datasketch_theta_num_retained(sketch_theta)":{"name":"datasketch_theta_num_retained","type":"scalar","categories":["Theta"],"returnType":"BIGINT","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""}],"description":"Returns the number of hash values retained in the sketch","examples":[{"description":"","code":"SELECT datasketch_theta_num_retained(sketch);"}],"relatedNames":["datasketch_theta"]},"datasketch_theta_union(sketch_theta,sketch_theta)":{"name":"datasketch_theta_union","type":"scalar","categories":["Theta"],"returnType":"sketch_theta","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""},{"name":"col1","type":"sketch_theta","paramType":"positional","description":""}],"description":"Approximate `|A ∪ B|` — distinct count across the union of two cohorts. Aggregate over a `sketch_theta` column to merge per-day or per-shard sketches.","examples":[{"description":"","code":"SELECT datasketch_theta_union(sketch1, sketch2);"}],"relatedNames":["datasketch_theta","datasketch_theta_intersect","datasketch_theta_a_not_b"]},"datasketch_theta_upper_bound(sketch_theta,INTEGER)":{"name":"datasketch_theta_upper_bound","type":"scalar","categories":["Theta"],"returnType":"DOUBLE","parameters":[{"name":"col0","type":"sketch_theta","paramType":"positional","description":""},{"name":"col1","type":"INTEGER","paramType":"positional","description":""}],"description":"Returns the upper bound estimate at the given number of standard deviations (1, 2, or 3)","examples":[{"description":"","code":"SELECT datasketch_theta_upper_bound(sketch, 2);"}],"relatedNames":["datasketch_theta","datasketch_theta_lower_bound"]}},"nameToId":{"datasketch_cpc":"datasketch_cpc(INTEGER,FLOAT)","datasketch_cpc_describe":"datasketch_cpc_describe(sketch_cpc)","datasketch_cpc_estimate":"datasketch_cpc_estimate(sketch_cpc)","datasketch_cpc_is_empty":"datasketch_cpc_is_empty(sketch_cpc)","datasketch_cpc_lower_bound":"datasketch_cpc_lower_bound(sketch_cpc,UTINYINT)","datasketch_cpc_union":"datasketch_cpc_union(INTEGER,sketch_cpc)","datasketch_cpc_upper_bound":"datasketch_cpc_upper_bound(sketch_cpc,UTINYINT)","datasketch_frequent_items":"datasketch_frequent_items(FLOAT)","datasketch_frequent_items_epsilon":"datasketch_frequent_items_epsilon(sketch_frequent_items)","datasketch_frequent_items_estimate":"datasketch_frequent_items_estimate(sketch_frequent_items,UBIGINT)","datasketch_frequent_items_get_frequent":"datasketch_frequent_items_get_frequent(sketch_frequent_items,VARCHAR)","datasketch_frequent_items_is_empty":"datasketch_frequent_items_is_empty(sketch_frequent_items)","datasketch_frequent_items_lower_bound":"datasketch_frequent_items_lower_bound(sketch_frequent_items,TINYINT)","datasketch_frequent_items_num_active":"datasketch_frequent_items_num_active(sketch_frequent_items)","datasketch_frequent_items_total_weight":"datasketch_frequent_items_total_weight(sketch_frequent_items)","datasketch_frequent_items_upper_bound":"datasketch_frequent_items_upper_bound(sketch_frequent_items,UTINYINT)","datasketch_hll":"datasketch_hll(INTEGER,TINYINT)","datasketch_hll_describe":"datasketch_hll_describe(sketch_hll,BOOLEAN,BOOLEAN)","datasketch_hll_estimate":"datasketch_hll_estimate(sketch_hll)","datasketch_hll_is_compact":"datasketch_hll_is_compact(sketch_hll)","datasketch_hll_is_empty":"datasketch_hll_is_empty(sketch_hll)","datasketch_hll_lg_config_k":"datasketch_hll_lg_config_k(sketch_hll)","datasketch_hll_lower_bound":"datasketch_hll_lower_bound(sketch_hll,UTINYINT)","datasketch_hll_union":"datasketch_hll_union(INTEGER,sketch_hll)","datasketch_hll_upper_bound":"datasketch_hll_upper_bound(sketch_hll,UTINYINT)","datasketch_kll":"datasketch_kll(INTEGER,sketch_kll_bigint)","datasketch_kll_cdf":"datasketch_kll_cdf(sketch_kll_float,FLOAT[],BOOLEAN)","datasketch_kll_describe":"datasketch_kll_describe(sketch_kll_ubigint,BOOLEAN,BOOLEAN)","datasketch_kll_is_empty":"datasketch_kll_is_empty(sketch_kll_tinyint)","datasketch_kll_is_estimation_mode":"datasketch_kll_is_estimation_mode(sketch_kll_bigint)","datasketch_kll_k":"datasketch_kll_k(sketch_kll_utinyint)","datasketch_kll_max_item":"datasketch_kll_max_item(sketch_kll_integer)","datasketch_kll_min_item":"datasketch_kll_min_item(sketch_kll_tinyint)","datasketch_kll_n":"datasketch_kll_n(sketch_kll_bigint)","datasketch_kll_normalized_rank_error":"datasketch_kll_normalized_rank_error(sketch_kll_integer,BOOLEAN)","datasketch_kll_num_retained":"datasketch_kll_num_retained(sketch_kll_uinteger)","datasketch_kll_pmf":"datasketch_kll_pmf(sketch_kll_float,FLOAT[],BOOLEAN)","datasketch_kll_quantile":"datasketch_kll_quantile(sketch_kll_float,DOUBLE,BOOLEAN)","datasketch_kll_rank":"datasketch_kll_rank(sketch_kll_tinyint,TINYINT,BOOLEAN)","datasketch_quantiles":"datasketch_quantiles(INTEGER,INTEGER)","datasketch_quantiles_cdf":"datasketch_quantiles_cdf(sketch_quantiles_utinyint,UTINYINT[],BOOLEAN)","datasketch_quantiles_describe":"datasketch_quantiles_describe(sketch_quantiles_smallint,BOOLEAN,BOOLEAN)","datasketch_quantiles_is_empty":"datasketch_quantiles_is_empty(sketch_quantiles_smallint)","datasketch_quantiles_is_estimation_mode":"datasketch_quantiles_is_estimation_mode(sketch_quantiles_smallint)","datasketch_quantiles_k":"datasketch_quantiles_k(sketch_quantiles_double)","datasketch_quantiles_max_item":"datasketch_quantiles_max_item(sketch_quantiles_integer)","datasketch_quantiles_min_item":"datasketch_quantiles_min_item(sketch_quantiles_ubigint)","datasketch_quantiles_n":"datasketch_quantiles_n(sketch_quantiles_ubigint)","datasketch_quantiles_normalized_rank_error":"datasketch_quantiles_normalized_rank_error(sketch_quantiles_bigint,BOOLEAN)","datasketch_quantiles_num_retained":"datasketch_quantiles_num_retained(sketch_quantiles_uinteger)","datasketch_quantiles_pmf":"datasketch_quantiles_pmf(sketch_quantiles_double,DOUBLE[],BOOLEAN)","datasketch_quantiles_quantile":"datasketch_quantiles_quantile(sketch_quantiles_double,DOUBLE,BOOLEAN)","datasketch_quantiles_rank":"datasketch_quantiles_rank(sketch_quantiles_double,DOUBLE,BOOLEAN)","datasketch_req":"datasketch_req(INTEGER,sketch_req_bigint)","datasketch_req_cdf":"datasketch_req_cdf(sketch_req_tinyint,TINYINT[],BOOLEAN)","datasketch_req_describe":"datasketch_req_describe(sketch_req_tinyint,BOOLEAN,BOOLEAN)","datasketch_req_is_empty":"datasketch_req_is_empty(sketch_req_tinyint)","datasketch_req_is_estimation_mode":"datasketch_req_is_estimation_mode(sketch_req_integer)","datasketch_req_k":"datasketch_req_k(sketch_req_tinyint)","datasketch_req_max_item":"datasketch_req_max_item(sketch_req_utinyint)","datasketch_req_min_item":"datasketch_req_min_item(sketch_req_smallint)","datasketch_req_n":"datasketch_req_n(sketch_req_bigint)","datasketch_req_num_retained":"datasketch_req_num_retained(sketch_req_double)","datasketch_req_pmf":"datasketch_req_pmf(sketch_req_float,FLOAT[],BOOLEAN)","datasketch_req_quantile":"datasketch_req_quantile(sketch_req_tinyint,DOUBLE,BOOLEAN)","datasketch_req_rank":"datasketch_req_rank(sketch_req_smallint,SMALLINT,BOOLEAN)","datasketch_tdigest":"datasketch_tdigest(INTEGER,sketch_tdigest_float)","datasketch_tdigest_cdf":"datasketch_tdigest_cdf(sketch_tdigest_float,FLOAT[])","datasketch_tdigest_describe":"datasketch_tdigest_describe(sketch_tdigest_double,BOOLEAN)","datasketch_tdigest_is_empty":"datasketch_tdigest_is_empty(sketch_tdigest_double)","datasketch_tdigest_k":"datasketch_tdigest_k(sketch_tdigest_double)","datasketch_tdigest_pmf":"datasketch_tdigest_pmf(sketch_tdigest_double,DOUBLE[])","datasketch_tdigest_quantile":"datasketch_tdigest_quantile(sketch_tdigest_float,DOUBLE)","datasketch_tdigest_rank":"datasketch_tdigest_rank(sketch_tdigest_float,FLOAT)","datasketch_tdigest_total_weight":"datasketch_tdigest_total_weight(sketch_tdigest_float)","datasketch_theta":"datasketch_theta(VARCHAR)","datasketch_theta_a_not_b":"datasketch_theta_a_not_b(sketch_theta,sketch_theta)","datasketch_theta_describe":"datasketch_theta_describe(sketch_theta)","datasketch_theta_estimate":"datasketch_theta_estimate(sketch_theta)","datasketch_theta_get_seed":"datasketch_theta_get_seed(sketch_theta)","datasketch_theta_get_theta":"datasketch_theta_get_theta(sketch_theta)","datasketch_theta_intersect":"datasketch_theta_intersect(sketch_theta,sketch_theta)","datasketch_theta_is_empty":"datasketch_theta_is_empty(sketch_theta)","datasketch_theta_is_estimation_mode":"datasketch_theta_is_estimation_mode(sketch_theta)","datasketch_theta_lower_bound":"datasketch_theta_lower_bound(sketch_theta,INTEGER)","datasketch_theta_num_retained":"datasketch_theta_num_retained(sketch_theta)","datasketch_theta_union":"datasketch_theta_union(sketch_theta,sketch_theta)","datasketch_theta_upper_bound":"datasketch_theta_upper_bound(sketch_theta,INTEGER)"}}