Windowing functions are way to group rows of data for analysis.
This provides a 'window' to look at only the relevant data
only. Plus there are about a dozen supporting functions to
take advantage of all this. There is some carry over logically
from the aggregate (or group by) functions but they open up some
easy ways to dig statistically into your data.
Now for a contrived example.
[Read more]
mysql> Select row_number() over w as '#',
Name, Continent, Population,
sum(Population) over w as 'Pop'
from country where continent='South America'
window w as (partition by Continent Order by Continent);
+----+------------------+---------------+------------+-----------+
| # | Name | Continent | Population | Pop | …