I answered a similar question for a PostgreSQL database.
I adapted it to your table names in a fiddle, it may need adaptations to run under Redshift (thus I don't post it as is here)
but it holds all the principles:
- identify sure starts of a span
- for each date, tell which subsequent date would be the next out of its 30-day span if it was itself a span start.
- then recurse over all potential span starts, marking the "surely valid" as valid then hoping to its successor indicated by step 2.