Code: Select all
SELECT DISTINCT computers.computerid AS 'ID',
computers.name AS 'Patched today',
clients.name AS 'Client',
commands.dateupdated AS 'Completed'
FROM commands JOIN computers ON (commands.computerid =
computers.computerid) JOIN clients ON (computers.clientid =
clients.clientid)
WHERE command = 100 AND `status` = 3
AND output LIKE '%No Updates to Install%'
AND commands.dateupdated >=CURDATE()
GROUP BY computers.name
ORDER BY `Completed` DESC