~/talk

Windowing Functions for Database Analytics

Talkat Data Love 2021 · on Friday, 2021-04-16· [databases, data-engineering]
slides:none on file

Introduction to SQL window functions with concrete MySQL 8.0 examples showing how to get running totals, moving averages, quartiles and percent ranks from table data. Demonstrates actual queries: MySQL 8.0 syntax, ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW frames, and LEAD/LAG for offsets; contrasts mistaken aggregate SUM() use vs partitioned window SUM(), shows partitioning by column, named windows, row_number/rank/dense_rank outputs, and handling of NULL and rollup so queries produce the per-row analytics expected.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:08What are windowing functions
  3. 3:39Aggregate vs window functions
  4. 8:58Key windowing function syntax
  5. 12:47Window frames and partitions
  6. 16:43Running totals by department
  7. 21:58Ranking and percentiles
  8. 24:09Calculating percentages
  9. 24:54Quartiles and averages
  10. 26:17Lead and lag functions
  11. 28:44Syntax and window definition
  12. 29:05Resources and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.