Ticket #10039: aggdocs.diff

File aggdocs.diff, 770 bytes (added by ElliottM, 6 years ago)
  • docs/topics/db/aggregation.txt

     
    105105will be annotated with the specified values.
    106106
    107107The syntax for these annotations is identical to that used for the
    108 ``aggregate()`` clause. Each argument to ``annotate()`` describes and
    109 aggregate that is to be calculated. For example, to annotate Books with
    110 the number of authors::
     108``aggregate()`` clause. Each argument to ``annotate()`` describes an aggregate
     109that is to be calculated. For example, to annotate Books with the number of
     110authors::
    111111
    112112    # Build an annotated queryset
    113113    >>> q = Book.objects.annotate(Count('authors'))
Back to Top