mabus Posted August 8, 2008 Share Posted August 8, 2008 Given records containing a DateTime column, how do I get a count of records for each month? I need results to resemble something like the following: June 2008, 13 July 2008, 10 August 2008, 15 ... ... Please send in your replies.. thanks Link to comment https://forums.phpfreaks.com/topic/118720-need-some-help-on-this-mysql-query-problem/ Share on other sites More sharing options...
vikramjeet.singla Posted August 8, 2008 Share Posted August 8, 2008 you have to group by this month and year of your date column.... Link to comment https://forums.phpfreaks.com/topic/118720-need-some-help-on-this-mysql-query-problem/#findComment-611298 Share on other sites More sharing options...
fenway Posted August 9, 2008 Share Posted August 9, 2008 YEARMONTH is a valid EXTRACT format for dates. Link to comment https://forums.phpfreaks.com/topic/118720-need-some-help-on-this-mysql-query-problem/#findComment-612475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.