I have the following table:
+----+---------------------+-------------+-----------------+
| id | stat_time | reads | writes |
+----+-
let's assume you have a column with name D-DATE_START so
$query = 'SELECT cast(D_DATE_START as date) as stat_day ,'
.'sum(I_REV_MODEL) as totalDayRevenu '
.'FROM t_show WHERE FK_MODEL=136 '
."and t_show.D_DATE_START between '".$after."' and '".$before."'"
.' GROUP BY cast(D_DATE_START as date) '
.' ORDER BY stat_day ';