Changes between Initial Version and Version 1 of Ticket #30394


Ignore:
Timestamp:
Apr 24, 2019, 3:30:54 AM (6 years ago)
Author:
Gouri Javed
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30394

    • Property Version 2.21.11
  • Ticket #30394 – Description

    initial v1  
    1 UserRoleAccount.objects.filter(pk='24f4a032-3f83-4123-8330-fa60fcbb880c').aggregate(
    2      given_count=Sum(
    3         Case(When(user_observations_given__group=grp, then=1),
    4               output_field=IntegerField())
    5      ),
    6      taken_count=Sum(
    7          Case(When(user_observations_taken__group=grp, then=1),
    8               output_field=IntegerField())
    9      )
    10  )
     1UserRoleAccount.objects.annotate(count=Sum(Case(When(user_observations_taken__group=grp,then=1)),default=0,output_field=IntegerField(),distinct=True)).annotate(count1=Sum(Case(When(user_observations_given__group=grp,then=1)),default=0,output_field=IntegerField(),distinct=True))
Back to Top