Oracle's CONNECT BY is a good idea. I forgot about that. CONNECT BY is technically for hierarchical queries but you could probably hack something together between connect by and windowing in Oracle. I'd be curious to see how the performance is.
Part of my behavioral database is a query language for event data. It's called EQL (Event Query Language). I don't mean to slam SQL to try to make my solution sound better. I wrangled event data with SQL at a company years ago and it was awful. Data was denormalized and stored in rows but we ran into issues of max column lengths and row chaining not to mention a ton of custom processing.
I've also tried using Redis as an event store but you really need your data processing on the same box as the data to get good performance. For example, Redis supports ~100K calls per second (depending on the command used) on a single box. You can retrieve multiple events at one time but you're still going to hit a network performance and CPU bottleneck serializing all that data, not to mention that you still need to process it. I built my behavioral database to compile EQL to optimized machine code using LLVM and then iterating over events in memory-mapped data files. As a comparison, I'm traversing about 50 million events per core per second.
I'm not trying to knock RDBMS systems or Redis. I used to be an Oracle DBA and I've used Redis on plenty of projects. Behavioral data is just a different beast though. It needs fundamentally different tools.