How To Create Date Series in SQL - Issue 32
Advanced SQL challenge on how to generate a time series in Postgres or RedShift.
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…
Keep reading with a 7-day free trial
Subscribe to Data Analysis Journal to keep reading this post and get 7 days of free access to the full post archives.