arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

percentiletdigest

This section contains reference documentation for the PERCENTILETDIGEST function.

Returns the Nth percentile of the group using T-digest algorithmarrow-up-right. An optional compression_factor can be specified to control the accuracy with a tradeoff in memory usage (i.e. higher compression_factor gives better accuracy but takes more memory). The default compression_factor is 100.

hashtag
Signature

PERCENTILETDIGEST(colName, percentile)

PERCENTILETDIGEST(colName, percentile, compression_factor)

hashtag
Usage Examples

These examples are based on the .

value
value
value

0

3.6571905392487856

46.26787306220119

Batch Quick Start
select PERCENTILETDIGEST(homeRuns, 50, 1000) AS value
from baseballStats 
select PERCENTILETDIGEST(homeRuns, 80) AS value
from baseballStats 
select PERCENTILETDIGEST(homeRuns, 99.9) AS value
from baseballStats