SELECT DATE_FORMAT(start_stamp,"%Y-%m-%d")as day,sum(fee) as total_fee FROM bill GROUP BY DATE_FORMAT(start_stamp,"%Y-%m-%d")