Hopefully MariaDB can incorporate SQL window functions:<p><a href="http://www.postgresql.org/docs/9.1/static/tutorial-window.html" rel="nofollow">http://www.postgresql.org/docs/9.1/static/tutorial-window.ht...</a><p>These have been part of PostgreSQL, SQL Server, Oracle, etc for quite a while and still absent from MariaDB/MySQL.