Grouping runs of data in SQL
There have been a handful of times over the last few years where I have needed to take time series data and group the runs of data together to determine when a certain value changed, and how long it stayed that way. Sample Data We have a log table that, after keeping only the columns relevant for this post, looks like the diagram above. logged_at […]
Grouping runs of data in SQL Continue Reading »