How to Find the Longest Consecutive Series of Events in SQL

A very interesting problem that can be solved very easily with SQL is to find consecutive series of events in a time series. But what is a consecutive series of events in a time series? Take Stack Overflow, for example. Stack Overflow has a cool reputation system that uses badges to reward certain behaviour. As … Continue reading How to Find the Longest Consecutive Series of Events in SQL