Hi Tom,
I really like the look of Count('emails').filter(unread=False) in the
annotate call.
Ian
On 12/04/17 21:35, Tom Forbes wrote:
> Hello,
> At the Djangocon sprints I wanted to add support for a postgres specific
> syntax for filtering aggregations, which is quite simple: MAX(something)
> F
Hello,
At the Djangocon sprints I wanted to add support for a postgres specific
syntax for filtering aggregations, which is quite simple: MAX(something)
FILTER (WHERE x=1).
During this the sprints I was told that it would be good to support this
for all databases, and it can be done using the CASE