Re: Aggregating annotations

2013-07-23 Thread Debanshu Kundu
aggregate(Max(books_per_rating)) > > I get a *DatabaseError*. > > According to this > https://docs.djangoproject.com/en/1.5/topics/db/aggregation/#aggregating-annotations, > > Django supports aggregating annotations. But in the example given in the > link itself, they annotate ove

Re: Aggregating annotations

2013-07-23 Thread Debanshu Kundu
'id')).aggregate(Max(books_per_rating)) >> >> I get a *DatabaseError*. >> >> According to this >> https://docs.djangoproject.com/en/1.5/topics/db/aggregation/#aggregating-annotations, >> >> Django supports aggregating annotations. But in the examp

Re: Aggregating annotations

2013-07-19 Thread Debanshu Kundu
bjects.values('rating').annotate(books_per_rating=Count('id')).aggregate(Max(books_per_rating)) > > I get a *DatabaseError*. > > According to this > https://docs.djangoproject.com/en/1.5/topics/db/aggregation/#aggregating-annotations, > > Django supports agg

Re: Aggregating annotations

2013-07-19 Thread Debanshu Kundu
> > and I run the query: > > Book.objects.values('rating').annotate(books_per_rating=Count('id')).aggregate(Max(books_per_rating)) > > I get a *DatabaseError*. > > According to this > https://docs.djangoproject.com/en/1.5/topics/db/aggregation/#aggrega

Aggregating annotations

2013-07-19 Thread Debanshu Kundu
: Book.objects.values('rating').annotate(books_per_rating=Count('id')).aggregate(Max(books_per_rating)) I get a *DatabaseError*. According to this https://docs.djangoproject.com/en/1.5/topics/db/aggregation/#aggregating-annotations, Django supports aggregating annotations. But in