Aggregate functions as Window Functions.

You are viewing an old version of this article. View the current version here.

It is possible to use aggregate function as window function. When aggregate function is used as window function, it must have the OVER clause. For example, here's COUNT() used as window function:

select COUNT(*) over  (order by column) from table;

MariaDB currently allows to use these aggregate functions as window functions: COUNT, SUM, AVG, BIT_OR, BIT_AND, BIT_XOR.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.