/plushcap/analysis/fivetran/bucketing-in-sql

Bucketing in SQL

What's this blog post about?

The text discusses how to use SQL for bucketing or binning continuous data such as numbers and time stamps. It explains various methods of bucketing including truncating, date_trunc, SQL intervals, and custom buckets using Postgres width_bucket function. An example is provided where the author uses these techniques to track when Numeracy users first connect a database and segment them into different user personas or 'buckets'. The purpose of this approach is to spot trends, uncover opportunities, and see where and how businesses generate value.

Company
Fivetran

Date published
Nov. 28, 2018

Author(s)
Eric Feng

Word count
1206

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.