I'm writing a website statistics system and have been using GROUP BY
TO_DAYS(time) in the sql to aggregate results for different days,
however there doesn't seem to be an equivalent function for other time
periods such as hours and months. Will I be able to use:

GROUP BY (MONTH(time),YEAR(time))

to achieve this result, or is there a better way?


Cheers,
Tim.

-- 
Tim Fountain ([EMAIL PROTECTED])
http://www.tfountain.co.uk/


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to