> I have a MySQL database containing records from several years. I want to
> calculate counts of records for each year and separate values for a couple
> of other fields. Each record contains a date-field, date. I tried putting
> the function YEAR(date) into a GROUP BY section, but this didnot work.

SELECT YEAR(date) AS yr GROUP BY yr

Jens


---------------------------------------------------------------------
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