width_bucket(x,bound1,bound2,n)


Query

presto:default> select width_bucket(5,3,4,5) as width; 

Result

 width 
------- 
   6

From the above input, 3 and 4 are different bounds and returns the bucket width as 6.

apache_presto_sql_functions.htm
Advertisements