Opened 6 years ago

Last modified 6 years ago

#30394 closed Bug

Mutiple annotation with Sum return wrong values. — at Version 1

Reported by: Gouri Javed Owned by: nobody
Component: Database layer (models, ORM) Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Gouri Javed)

UserRoleAccount.objects.annotate(count=Sum(Case(When(user_observations_takengroup=grp,then=1)),default=0,output_field=IntegerField(),distinct=True)).annotate(count1=Sum(Case(When(user_observations_givengroup=grp,then=1)),default=0,output_field=IntegerField(),distinct=True))

Change History (1)

comment:1 by Gouri Javed, 6 years ago

Description: modified (diff)
Version: 2.21.11
Note: See TracTickets for help on using tickets.
Back to Top