先使用group by 把时间做以一个分组,查询出每天的最大值,再用order by desc降序排序,
select max(price), ordertime from time1 GROUP BY ordertime ORDER BY ordertime DESC LIMIT 1
先使用group by 把时间做以一个分组,查询出每天的最大值,再用order by desc降序排序,
select max(price), ordertime from time1 GROUP BY ordertime ORDER BY ordertime DESC LIMIT 1