Hello,
I have a model like this:
class Report(models.Model):
date_submitted = models.DateTimeField()
I want to calculate some aggregate counts per month. The SQL query for
this would be:
SELECT YEAR(date_submitted), MONTH(date_submitted), count(id)
FROM Report
GROUP BY YEAR(date_submitted), MONTH(date_submitted)
Is it possible to get my counts with the aggregation API of Django 1.1
without resorting to database-dependent code?
If no, is this functionality supported by some later version of the
aggregation API or planned for some future release?
Thanks for the help!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.