SELECT DATE_FORMAT(b.`bill_CjTime`,'%Y-%m-%d') AS d,MAX(b.`bill_CjTime`) AS t FROM `bill` AS b GROUP BY d;