Sql group by query January 20, 2015 $sql = "SELECT *,count(`created_on`) as blogcount FROM `tbl_blog` group by DATE_FORMAT(`created_on`,\'%M %Y\') order by created_on asc"; Read more