Window functions calculates things like
Window function can work with: SUM(), AVG(), MAX(), MIN(), COUNT(), VARIANCE(), and STDDEV().
Window function can also work with FIRST_VALUE() and LAST_VALUE(), which return the first and last values in a window.