select price,time from( select price,time,date from ( select price,time,date from on_jiaoyi_into where sid=3 order by date,time desc ) a ) b group by date
查询每天最早的记录和最晚的记录
原文:http://www.cnblogs.com/hellowzd/p/5114990.html