equi_width_bins()

Generates bin_count equi-width bins between the min and max. If enabled nice_rounding makes the numbers more readable/less jagged

Arguments & returns

4 overloads

equi_width_bins(min, max, bin_count, nice_rounding)

Scalar
Overload link minmaxbin_countnice_rounding Returns
#01 ANYANYBIGINTBOOLEAN ANY[]
#02 BIGINTBIGINTBIGINTBOOLEAN ANY[]
#03 DOUBLEDOUBLEBIGINTBOOLEAN ANY[]
#04 TIMESTAMPTIMESTAMPBIGINTBOOLEAN ANY[]

Example

equi_width_bins example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.