Re: Multiple annotations in one query

2018-09-24 Thread David
; > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *David > *Sent:* Monday, September 24, 2018 9:36 AM > *To:* Django users > *Subject:* Multiple annotations in one query > > > > Hi > > > > I understand that performing

RE: Multiple annotations in one query

2018-09-24 Thread Matthew Pava
/#window-functions https://docs.djangoproject.com/en/2.1/ref/models/expressions/#subquery-expressions From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of David Sent: Monday, September 24, 2018 9:36 AM To: Django users Subject: Multiple annotations in one query Hi

Multiple annotations in one query

2018-09-24 Thread David
Hi I understand that performing multiple annotations on a queryset will produce incorrect results, I was wondering how anyone else gets around this? "Combining multiple aggregations with annotate() will yield the wrong results because joins are use