There is such a request:
SELECT DATE_FORMAT(`orders`.`date`, '%d.%m.%Y') as `date`, `orders`.`id` FROM `orders` WHERE `orders`.`status` = 1 AND `orders`.`date` >= '2016-09-08' AND `orders`.`date` <= ('2016-09-11' + INTERVAL 1 DAY) GROUP BY `orders`.`id` ORDER BY `orders`.`date` DESC
I get this result:
date id ---------- ------- 11.09.2016 10051961 11.09.2016 10051962 11.09.2016 10051963 10.09.2016 10051895 10.09.2016 10051894 10.09.2016 10051897 10.09.2016 10051898 10.09.2016 10051894 09.09.2016 10051898 09.09.2016 10051890 08.09.2016 10051792 08.09.2016 10051789
The question is how to group the number of orders by day, that is, of the form:
date count ---------- ------- 11.09.2016 3 10.09.2016 5 09.09.2016 2 08.09.2016 2