MySQL Forums
Forum List  »  General

How can I GROUP BY YEAR but multiple years?
Posted by: KRISTY ATKINS
Date: October 07, 2022 02:42PM

I have a field in a query: YEAR(answers.DateCreated) AS YearCreated
I understand that I can GROUP BY YearCreated

I'd like to add an option to have a field that represents 5 years.
Can I do that? If so how?

Options: ReplyQuote


Subject
Written By
Posted
How can I GROUP BY YEAR but multiple years?
October 07, 2022 02:42PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.