SELECT *,count(1),SUM(if(ARRIVE.ARRIVE_TIME != '无',1,0)) as s FROM lt_cleanroute_point_arrive AS ARRIVE WHERE DATE_FORMAT(data_dt,'%Y-%m') = '2022-12' and TIME(data_dt) BETWEEN '00:00:00' AND '12:00:00' GROUP BY NAME ORDER BY data_dt
分组后显示的日期会隐藏很多时期,只显示部分,注意这个细节。
标签:00,data,分组,mysql,dt,ARRIVE,数据 From: https://www.cnblogs.com/wangweiip/p/16994143.html