PostgreSQL specific aggregation functions
PostgreSQL specific aggregation functions
These functions are described in more detail in the PostgreSQL docs.
Note
All functions come without default aliases, so you must explicitly provide one. For example:
>>> SomeModel.objects.aggregate(arr=ArrayAgg('somefield')) {'arr': [0, 1, 2]}
General-purpose aggregation functions
ArrayAgg
-
class ArrayAgg(expression, **extra)
登录查看完整内容