Skip to main content
Version: 24.3.x

Categories: Percentile

APPROX_PERCENTILE

Computes the approximate percentile of the given column and quantile.

Syntax

APPROX_PERCENTILE(column_name numeric, percentile double) → DOUBLE

  • column_name: The column for which to compute the approximate percentile.
  • percentile: The percentile to use in the approximation. Must be a number between 0 and 1.

Examples

APPROX_PERCENTILE example
SELECT APPROX_PERCENTILE(pop, 0.5) FROM Samples."samples.dremio.com"."zips.json"
-- 2780.17855684608