A customer had a challenge: split a series of events into groups. Starting with the earliest event, find the next event at least 7 days after this. Keep repeating this process until there are no more events.
They had built a recursive WITH query to run these calculations. The problem: it was too slow!
Join this session to see the process of analysing and improving the query and why recursive WITH was the wrong solution for this problem!