Blog

Blog SQL Arena

Poradniki SQL

Podstawy: SELECT i filtrowanie

4 artykuły

Łączenie tabel (JOIN)

3 artykuły

Agregacja i grupowanie

2 artykuły

Podzapytania i DISTINCT

4 artykuły

Funkcje okna

5 artykułów

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 maj 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 maj 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 maj 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 maj 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 maj 2026SQLwindow-functionstutorialanalytics

CTE (WITH)

1 artykuł

Zmiany danych (DML)

3 artykuły

Schemat (DDL)

2 artykuły

Łańcuchy znaków i daty

3 artykuły

CASE i NULL

3 artykuły

Inne

2 artykuły