MySQL - Query a date range
You wanted the result must be like this:

 date       | result
2018-09-01   |    0
2018-09-02   |    0
2018-09-03   |    0
2018-09-04   |    0
....
2018-09-28   |    0
2018-09-29   |    2
2018-09-28   |    1


You need to create a table or temporary table for number of days

id 
1
2
3
4
...
28
29
30
31


And try to query this: 

SELECT 
    DATE((select CONCAT(YEAR(CURDATE()), '-', MONTH(CURDATE()),'-' ,day))) as Date1, 
        COUNT(o.order_id) 
        as counting from orders as o 
        right join numberofdays d 
        on d.day = DAY(o.created_at) 
        GROUP BY Date1
        ORDER BY Date1


I used RIGHT JOIN:



Hope this might help. Thanks.