annotate() will yield the wrong results because joins are used instead of subqueries"Hi David,
Performing multiple annotations on a queryset is not the same as combining multiple aggregations.
Saying that, if you truly are getting wrong results, you could try using the Window functions or the Subquery object.
https://docs.djangoproject.com/en/2.1/ref/models/database-functions/#window-functions
https://docs.djangoproject.com/en/2.1/ref/models/expressions/#subquery-expressions
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/963bba41-6bcb-43b5-bd34-9ae4b9f709d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.