Binning

Learn how to use binning in SQL.

Overview

Binning or bucketing, is a technique to divide a series of values into ranges for analysis or for visualization. For each range, we calculate the frequency—the number of values from the series that fit in this range. The ranges are often referred to as bins, buckets, or groups.

To demonstrate different binning techniques, we are going to use a table with student grades:

Get hands-on with 1200+ tech skills courses.