Where's the answer for day 1, part 2? Here's day 1 - https://github.com/mitchellh/advent-2021-sql/blob/main/day01...
I can't see where it is creating a window of three results to compare against. I guess, you might just be able to change the offset to 3, as the offsets of 1 and 2 will be included in your current window so don't need to be compared.