I cannot use ORDER BY DESC because the result will be many rows where each row gives the max of a particular group.
Code: Select all
SELECT
DATE_FORMAT(`Entry`,'%M %Y') AS `Month`,
MAX(COUNT(DISTINCT `ID`))
FROM `Table1`
GROUP BY `Month`
ORDER BY LEFT(`Entry`,7) ASCBut I can't get it figured out.
Any way out ?
Thanks