PostgreSQL/Analytical Functions/width bucket

Материал из SQL эксперт
Версия от 13:14, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

width_bucket(op numeric, b1 numeric, b2 numeric, count int)

   <source lang="sql">

--width_bucket(op numeric, b1 numeric, b2 numeric, count int) --Return the bucket to which operand would be assigned in an equidepth histogram with count --buckets, an upper bound of b1, and a --lower bound of b2

postgres=# postgres=# select width_bucket(5.35, 0.024, 10.06, 5);

width_bucket

           3

(1 row) postgres=#

      </source>