select DATE_FORMAT(`date_public`, '%Y年%m月') as `date`, DATE_FORMAT(`date_public`, '%Y%m') as `val`, count(`no`) as `count` from `new_contents` where `disp_flg` is NULL and `visible` = 1 and `def_no` =1 and `menu_no` = group by `date` order by `date` desc

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by `date` order by `date` desc' at line 1