`id`,`tenant_id`,`vendor_type`,`cmd_type`,`create_date`,`update_date`,`cmd_json`
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `vendor_type` = #{vendorType}
and `cmd_type` = #{cmdType}
and `create_date` = #{createDate}
and `update_date` = #{updateDate}
and `cmd_json` like concat('%', #{cmdJson},'%')
and id in
#{idItem}
order by ${sortColumns}
select
from wx_car_cmd_log
select count(c.id) carcount,c.create_date from (
select id,DATE_FORMAT(create_date,'%Y-%m-%d') create_date
from wx_car_cmd_log where tenant_id = #{tenantId} and cmd_type=#{cmdType}
and create_date BETWEEN #{startdate} and #{enddate}
) c
group by c.create_date
select count(c.id) carcount,c.create_time from (
select id,DATE_FORMAT(DATE_ADD(create_date,INTERVAL 1 HOUR),'%H:00') create_time
from wx_car_cmd_log where tenant_id = #{tenantId} and cmd_type=#{cmdType}
and create_date BETWEEN #{startdate} and #{enddate}
) c group by c.create_time order by c.create_time
select count(c.id) carcount,c.create_time from (
select id,DATE_FORMAT(create_date,'%m/%d') create_time
from wx_car_cmd_log where tenant_id = #{tenantId} and cmd_type=#{cmdType}
and create_date BETWEEN #{startdate} and #{enddate}
) c group by c.create_time order by c.create_time
select DATE_FORMAT(create_date,'%Y-%m-%d') xTime, count(c.id) triggerCount
from wx_car_cmd_log c where tenant_id = #{tenantId} and cmd_type=#{cmdType}
and create_date BETWEEN #{startTime} and #{endTime}
group by xTime
select json_unquote(JSON_EXTRACT(cmd_json,'$.plateNumber')) plateNumber from wx_car_cmd_log where tenant_id=#{tenantId}
and create_date BETWEEN #{startdate} and #{enddate}
and json_unquote(JSON_EXTRACT(cmd_json,'$.plateNumber')) is not null
group by plateNumber
select `tenant_id` from wx_car_cmd_log
where cmd_type = 601 and json_extract(cmd_json, "$.synId") = #{synId}