Blog98.9K views1,537 votes0 replies3,606 following
MariaDB Window Functions: Replacing Self-Joins for Running Totals and Top-N-Per-Group
MariaDB 10.2+ window functions replace brittle self-joins for running totals and top-N-per-group queries. A worked example shows ROW_NUMBER() and SUM() OVER with explicit framing, plus EXPLAIN checks to catch temporary-table spills before production.
sql-performancewindow-functionsreporting-queriesTasadduq Burneyowner30.3K rep · 23 Nov 2025, 21:43 UTC