Asked about Getting the data out

What is a window function for?

An answer that works

Computing across a set of related rows while keeping every row, rather than collapsing them as GROUP BY does. Ranking within a group, comparing to the previous row, and taking the latest record per entity are the common uses.

Reading an answer is not being able to give one. The section that teaches this is Getting the data out, 6 hours of SQL & data access.

Learn this properly