Browse files

Fixed #10052 -- Added import line for other aggregates used in exampl…

…es. Thanks to Tyler Brownell <> for the suggestion.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 0e15932 commit f5ed27cf1f26a678869d91cbbfca24dc53e603e5 @freakboy3742 freakboy3742 committed Jan 23, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 docs/topics/db/aggregation.txt
@@ -88,6 +88,7 @@ If you want to generate more than one aggregate, you just add another
argument to the ``aggregate()`` clause. So, if we also wanted to know
the maximum and minimum price of all books, we would issue the query::
+ >>> from django.db.models import Avg, Max, Min, Count
>>> Book.objects.aggregate(Avg('price'), Max('price'), Min('price'))
{'price__avg': 34.35, 'price__max': Decimal('81.20'), 'price__min': Decimal('12.99')}

0 comments on commit f5ed27c

Please sign in to comment.