Scott Hill wrote:
> I have a table with a datetime column and I want to group by week.  Any
> ideas on how to do this with a MySQL query?  The table has a timein column,
> a timeout column and a column called elapsed.  I want to sum the elapsed for
> each week.  I know I can do this in the where clause by specifying a date
> range but it is possible to do this with group by?
> 
> Thanks,
> 

Have you tried:

GROUP BY YEARWEEK(mydatetimecolumn)

Alvaro

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to