Blog

SQL Arena-blog

SQL-tutorials

Basis: SELECT en filteren

4 artikelen

Tabellen koppelen (JOIN)

3 artikelen

Aggregatie en groeperen

2 artikelen

Subquery's en DISTINCT

4 artikelen

Vensterfuncties

5 artikelen

What is ROW_NUMBER in SQL? Row numbering for beginners

ROW_NUMBER assigns "a sequential number to each row". Plain words: the first window function worth learning. Descending numbering, numbering within groups via PARTITION BY, the classic top-N per group pattern, and dedup. With tables and common pitfalls.

8 mei 2026SQLROW_NUMBERwindowtutorial

What are RANK and DENSE_RANK in SQL? Ranking with ties for beginners

RANK and DENSE_RANK are ranking functions where equal values get equal ranks. Plain words: the difference between ROW_NUMBER (always unique), RANK (ties get equal rank with gaps after), and DENSE_RANK (equal rank without gaps). With tables, an Olympic-style example, and common pitfalls.

8 mei 2026SQLRANKDENSE_RANKwindow

What is PARTITION BY in SQL? Groups inside a window for beginners

PARTITION BY is the part of OVER that splits rows into groups for window functions. Plain words: like GROUP BY, but rows don't collapse — each row stays, with its group's aggregate appended. The difference from GROUP BY, typical patterns, and aggregate behavior inside windows.

8 mei 2026SQLPARTITION BYwindowtutorial

What are LAG and LEAD in SQL? Neighbouring rows in a window for beginners

LAG and LEAD return the value from the **previous** or **next** row of a window. Plain words: day-over-day delta, time-to-next-event, price change — tasks that previously required self-joining a table. With tables and common pitfalls.

8 mei 2026SQLLAGLEADwindow

Window functions in SQL: ROW_NUMBER, RANK, LAG/LEAD in practice

Window functions are the analyst's most-used tool in SQL. We'll break down ROW_NUMBER, RANK, LAG/LEAD and PARTITION BY through real cases: top-N per group, day-over-day metrics, cumulative sums.

3 mei 2026SQLwindow-functionstutorialanalytics

CTE's (WITH)

1 artikel

Datawijzigingen (DML)

3 artikelen

Schema (DDL)

2 artikelen

Strings en datums

3 artikelen

CASE en NULL

3 artikelen

Overig

2 artikelen