K1000 Last Sync Reporting
Trying to develop a report for all computers that haven't synced back in the last 40 days or greater. Have the report working fine - however it displays ALL computers that haven't reported back, not just the ones that haven't reported in 40 days or more.
Below is the syntax i'm using at the moment, can someone please assist?
select DATE_FORMAT(LAST_SYNC,'%W %m-%d-%Y') as LAST_SYNC, MACHINE.NAME as MACHINE_NAME, SYSTEM_DESCRIPTION, IP, MAC, REPLACE(MACHINE.USER_LOGGED,'\\','\\\\') as USER_LOGGED, CS_DOMAIN, LAST_SYNC as LAST_SYNC_TIME from MACHINE where (CURDATE() - INTERVAL 40 DAY) > 40 order by LAST_SYNC_TIME