查询customer_data_log 表中——近30天——每天的create_time最大值——按日期排序
select from_unixtime(max(aa.create_time),'%Y-%m-%d %H:%i:%s') as max,from_unixtime(aa.create_time,'%Y-%m-%d') as ttt,aa.type from
(select a.create_time,a.type from customer_data_log a
where DATEDIFF('2021-08-30', from_unixtime(a.create_time,'%Y-%m-%d'))<=30
) aa
group by ttt