Select Between Date Range Mysql
In your first query you do ...orders.created  &lt;= '2015-07-31'; which is actually 

orders.created  &lt;= '2015-07-31 00:00:00';


since you have a timestamp or datetime datatype. Either use the DATE() function like you did in your other attempt, or write it like

orders.created  &lt;= '2015-07-31 23:59:59';