Query failed SELECT date_format( DateExt, '%d/%m' ) , count( * ) ,DateExt FROM `index_art_soc` WHERE DateExt >= curdate()-Interval 90 day and IdSoc= GROUP BY 1 order by 3 asc