Skip to main content
Skip to main content

quantilesBFloat16

quantilesBFloat16

Introduced in: v21.7.0

Computes multiple approximate quantiles of a sample consisting of bfloat16 numbers at different levels simultaneously.

This function is equivalent to quantileBFloat16 but allows computing multiple quantile levels in a single pass, which is more efficient than calling individual quantile functions.

Syntax

quantilesBFloat16(level1, level2, ...)(expr)

Parameters

  • level — Levels of quantiles. One or more constant floating-point numbers from 0 to 1. We recommend using level values in the range of [0.01, 0.99]. Float*

Arguments

  • expr — Expression over the column values resulting in numeric data types, Date or DateTime. (U)Int* or Float* or Date or DateTime

Returned value

Array of approximate quantiles of the specified levels in the same order as the levels were specified. For Date and DateTime inputs the output format matches the input format. Array(Float64) or Array(Date) or Array(DateTime)

Examples

Computing multiple bfloat16 quantiles

SELECT quantilesBFloat16(0.25, 0.5, 0.75)(number) FROM numbers(10)
┌─quantilesBFloat16(0.25, 0.5, 0.75)(number)─┐
│ [2,4,7]                                    │
└────────────────────────────────────────────┘