此查询需要很长时间才能产生结果。并在 php 页面中创建 500 内部服务器错误。
SELECT DISTINCT tower_mac_address AS MAC_Address, tower_survey_no AS Survey_No
FROM tower
WHERE
SUBSTR(REPLACE(tower_mac_address,':',''),7,6)
NOT IN
(SELECT DISTINCT deviceid FROM device_data
WHERE SUBSTRING(date_time,1,10)=CURRENT_DATE)
请帮忙