Blag

Blag SQL Arena

Teagaisc SQL

Bunúsacha: SELECT agus scagadh

4 alt

Táblaí a cheangal (JOIN)

3 alt

Comhiomlánú agus grúpáil

2 alt

Fo-iarratais agus DISTINCT

4 alt

Feidhmeanna fuinneoige

5 alt

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

CTEanna (WITH)

1 alt

Athruithe sonraí (DML)

3 alt

Scéim (DDL)

2 alt

Teaghráin agus dátaí

3 alt

CASE agus NULL

3 alt

Eile

2 alt