# Aggregate Functions as Window Functions

It is possible to use [aggregate functions](../../aggregate-functions) as window functions. An aggregate function used as a window function must have the `OVER` clause. For example, here's [COUNT()](../../aggregate-functions/count) used as a window function:

```sql
SELECT COUNT(*) OVER (ORDER BY column) FROM table;
```

MariaDB currently allows these aggregate functions to be used as window functions:

* [AVG](../../aggregate-functions/avg)
* [BIT\_AND](../../aggregate-functions/bit_and)
* [BIT\_OR](../../aggregate-functions/bit_or)
* [BIT\_XOR](../../aggregate-functions/bit_xor)
* [COUNT](../../aggregate-functions/count)
* [MAX](../../aggregate-functions/max)
* [MIN](../../aggregate-functions/min)
* [STD](../../aggregate-functions/std)
* [STDDEV](../../aggregate-functions/stddev)
* [STDDEV\_POP](../../aggregate-functions/stddev_pop)
* [STDDEV\_SAMP](../../aggregate-functions/stddev_samp)
* [SUM](../../aggregate-functions/sum)
* [VAR\_POP](../../aggregate-functions/var_pop)
* [VAR\_SAMP](../../aggregate-functions/var_samp)
* [VARIANCE](../../aggregate-functions/variance)

<sub>_This page is licensed: CC BY-SA / Gnu FDL_</sub>

{% @marketo/form formId="4316" %}
