Django aggregation and a simple GROUP BY
I love Django's aggregation framework. It very successfully abstracts the common aggregration tasks into a Pythonic syntax that sits extremely well with the rest of the ORM, and the documentation explains it all without a single reference to SQL.
But sometimes that very abstraction gets in the way of ...
more ...