Problems / NTILE Buckets / Editorial
NTILE(n) divides an ordered partition into n roughly equal groups and assigns each row a group number.
NTILE(n)
n
This is commonly used for percentile analysis, salary bands, or segmenting customers into tiers.
Solve NTILE Buckets yourself →