Re: Aggregate on part of a date field?

2013-04-21 Thread dan
Please do not license your code with GPL. On Thursday, September 9, 2010 12:38:19 AM UTC+2, sebastien piquemal wrote: > > I created a library to address this kind of problems : > http://code.google.com/p/django-cube/ > > It bases the aggregation on a multidimensional view of your data (a > cube

Re: Aggregate on part of a date field?

2010-09-08 Thread sebastien piquemal
I created a library to address this kind of problems : http://code.google.com/p/django-cube/ It bases the aggregation on a multidimensional view of your data (a cube), so basically you can group_by in any way you want ("any way you want" = "on all the dimensions that you want", so you have to decl

Re: Aggregate on part of a date field?

2010-09-08 Thread Russell Keith-Magee
On Wed, Sep 8, 2010 at 12:51 AM, Don wrote: > I need to create a query that aggregates values by the year of a date > field. I have not been able to discover a way to do this yet, perhaps > someone can help. I can issue the following raw query, which gives the > results I want: > > cursor.execute(

Aggregate on part of a date field?

2010-09-07 Thread Don
I need to create a query that aggregates values by the year of a date field. I have not been able to discover a way to do this yet, perhaps someone can help. I can issue the following raw query, which gives the results I want: cursor.execute("""SELECT year(oac_date) as year, month(oac_date) as mon