Is it possible in mySQL to GROUP BY months on a date field? For example:
SELECT invDate,prdCategory,sum(prdPrice) GROUP BY left(invDate,6),prdCategory If invDate is in the format 20020202 then group by the first 6 characters would return the total of sales by product category and by month. I hope the question is clear enough. Thank you Serge Grenier --------------------------------------------------------------------- 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