Data Analysis Journal

Data Analysis Journal

SQL

How To Create Date Series in SQL - Issue 32

Advanced SQL challenge on how to generate a time series in Postgres or RedShift.

Olga Berezovsky's avatar
Olga Berezovsky
Feb 17, 2021
∙ Paid

Let’s say you have a task to make a timeline of DAU (Daily Active Users) or users who purchased or subscribed daily. You’d need to prepare the data in the following format: 

If your table contains only user clicks or purchases on a given day, you might not have date values when users did 0 activity or no conversion. However, you need to extract those dat…

User's avatar

Continue reading this post for free, courtesy of Olga Berezovsky.

Or purchase a paid subscription.
© 2026 Olga Berezovsky · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture