查询海康平台记录和本地记录差别sql
select hr.* ,temp.* from hik_record hr left join (SELECT pr.*,p.name FROM `person_record` pr LEFT JOIN person p on p.id_card=pr.id_card where pr.record_time BETWEEN '2022-06-04 00:00:00' and '2022-06-04 23:59:59' order by pr.record_time desc) temp on hr.hik_name=temp.name and hr.record_time=temp.record_time
where temp.id_card is null group by hr.id order by hr.record_time desc