测试数据
查询sql语句如下
select max(aa.rq) as MaxcreateTime ,aa.result,aa.xulie
from
(
select convert(a.rq,CHAR(10)) datetemp,a.rq,a.result,a.xulie
from test a
where DATE_SUB(CURDATE(), INTERVAL 1 MONTH) <= date(a.rq)
GROUP BY a.rq
ORDER BY a.xulie desc
) as aa
group by aa.datetemp