Tag archive
Commands grouped around the same concept, pattern, or recurring problem.
Use `ROW_NUMBER()` to identify duplicate rows and delete every copy except the one you want to keep.
Create stable run groups without a primary key by subtracting two `ROW_NUMBER()` calculations over the same ordered events.
Assign sequential integers to rows within a partition without collapsing the result set the way `GROUP BY` does.
Use `ROW_NUMBER()` to rank rows within each group and keep only the highest-ranked row.