兄弟,你这是mysql,开始被你误导啦
select a.* from mytable a,
(select date(mydate) mydate,max(mydate) max_datetime from mytable where date(mydate) between '2014-07-23' and '2014-07-28' group by date(mydate)) b
where a.mydate=b.max_datetime
and date(a.mydate)=b.mydate