erzoolander
asked on
MySQL Grouping
I've got a database table that has a row with a bunch of dates in it - each representing an item that was entered on that date. So, there are hundreds of entries, each with a date formatted as "YYYY-MM-DD".
What I'd like to do is get a return of the individual months that have entries. So, say there were:
5 various entries in December 2015
3 entries in February 2016
4 entries in August 2016
2 Entries in December 2016
return back something that would denote:
December 2015, February 2016, August 2016, December 2016.
The number of entries per month is irrelevant...just the fact that there are entries in that month.
How would I go about doing that query? Somehow trim the day off so it's just returning "2016-12" ... or?
Thanks in advance!
What I'd like to do is get a return of the individual months that have entries. So, say there were:
5 various entries in December 2015
3 entries in February 2016
4 entries in August 2016
2 Entries in December 2016
return back something that would denote:
December 2015, February 2016, August 2016, December 2016.
The number of entries per month is irrelevant...just the fact that there are entries in that month.
How would I go about doing that query? Somehow trim the day off so it's just returning "2016-12" ... or?
Thanks in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.