Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
mauler committed Apr 8, 2014
1 parent 27b4412 commit 276696c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.rst
Expand Up @@ -70,14 +70,14 @@ With conditional aggregates you can get it all with only **1 query**:
from aggregate_if import Count, Sum
Offer.objects.aggregate(
Count('pk'),
Count('pk', only=Q(status=Offer.OPEN)),
Count('pk', only=Q(status=Offer.REVOKED)),
Count('pk', only=Q(status=Offer.PAID)),
Sum('price'),
Sum('price', only=Q(status=Offer.OPEN)),
Sum('price'), only=Q(status=Offer.REVOKED)),
Sum('price'), Q(status=Offer.PAID)),
pk__count=Count('pk'),
pk__open__count=Count('pk', only=Q(status=Offer.OPEN)),
pk__revoked__count=Count('pk', only=Q(status=Offer.REVOKED)),
pk__paid__count=Count('pk', only=Q(status=Offer.PAID)),
pk__sum=Sum('price'),
pk__open__sum=Sum('price', only=Q(status=Offer.OPEN)),
pk__revoked__sum=Sum('price'), only=Q(status=Offer.REVOKED)),
pk__paid__sum=Sum('price'), only=Q(status=Offer.PAID))
)
Installation
Expand Down

0 comments on commit 276696c

Please sign in to comment.