Subject | GROUP BY ON MONTH or YEAR of DATE FIELDS |
---|---|
Author | enricorav <enricorav@hotmail.com> |
Post date | 2003-01-17T11:16:11Z |
Hi to all,
there are some methods for make a SELECT with GROUP BY on a part of a
DATE or TIMESTAMP fields?
Something like this:
SELECT ...
FROM MY_TABLE
...
GROUP BY MONTH(DATE_REG), YEAR(DATE_REG)
where DATE_REG are a DATE fields or TIMESTAMP fields ?
Thank you in advance,
Enrico.
there are some methods for make a SELECT with GROUP BY on a part of a
DATE or TIMESTAMP fields?
Something like this:
SELECT ...
FROM MY_TABLE
...
GROUP BY MONTH(DATE_REG), YEAR(DATE_REG)
where DATE_REG are a DATE fields or TIMESTAMP fields ?
Thank you in advance,
Enrico.