Design a rolling event tracker with ranges | Databricks