SELECT
COUNT(pa.ci_name)
FROM
maintance_baseline_task mbt
LEFT JOIN ares_service_platform.platform_assets pa ON mbt.asset_id = pa.ci_id
where DATEDIFF(NOW(),FROM_UNIXTIME(mbt.last_scantime)) = 0
关键函数 DATEDIFF(A,B);判断两个时间是不是在一天。
FROM_UNIXTIME(时间戳);时间戳转化为日期格式
学习http://www.mamicode.com/info-detail-2867034.html
https://blog.csdn.net/weixin_42575310/article/details/88995279