WIDTH BUCKET Function Syntax | Teradata Vantage - WIDTH BUCKET Function Syntax - Teradata Vantage - Analytics Database

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢
WIDTH BUCKET (value_expression, lower_bound, upper_bound, partition_count)

Syntax Elements

value_expression
The value for which a partition number is to be returned.
lower_bound
The lower boundary for the range of values to be partitioned equally.
upper_bound
The upper boundary for the range of values to be partitioned equally.
partition_count
Number of partitions to be created.
This value also specifies the width of the partitions by default.
The number of partitions created is partition_count + 2. Partition 0 and partition partition_count + 1 account for values of value_expression that are outside the lower and upper boundaries.