Started looking at lightning talks from #normconf and from the first one (by @afioritto) I learnt about QUALIFY to filter results from a WINDOW function in SQL. Wish I knew this last year. Would have avoided a lot of ugly CTEs.

https://www.youtube.com/watch?v=JqITueHybVk

Qualify:The SQL Filtering Statement You Never Knew You Needed - Amanda Fioritto

YouTube