~/talk

Postgres Window Magic

Talkat PostgresOpen Silicon Valley 2017 · 2017-09-06..09-08· [databases]
slides:none on file

A practical walkthrough of Postgres window functions that pins down actual behavior: defaults are range vs rows (default = range), order by changes what “current row” means, and frame clauses determine visible rows; examples use generate_series(1,10), duplicates, and a temp employees table to show sums, cumulative totals, partition by behavior, and functions like lag/lead, row_number, first_value/last_value, rank/dense_rank. Slides and runnable SQL (Postgres 10) demonstrate each case and recommended explicit framing.

AI-written summary · about

  1. 0:00Intro
  2. 2:46Window Functions
  3. 11:45Window Function Syntax
  4. 15:52Generic Aggregates
  5. 20:11One Following
  6. 21:24Order By
  7. 24:29Empty Window
  8. 31:00Partition By
  9. 34:52Layering
  10. 35:40Questions
  11. 39:59RowNumber
  12. 41:59Lag
  13. 43:25First Last Value
  14. 45:16Third Last Value
  15. 47:26Rank and Dense Rank
  16. 48:13Rank
  17. 48:26Rank Example
  18. 52:56Create a temp table
  19. 53:17Create a generic area
  20. 53:32Group Buy
  21. 53:48Rollup
  22. 54:04Salaries
  23. 54:16Window Function
  24. 55:20Window Average
  25. 58:24Ranks
~/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.