K1000: Add Assigned User to Existing Machine Software Report
Hello, I have this report that polls all computers and grabs whether a certain software package is "Installed" or "Not Installed". What I want to do is add who the Assigned User is (from the Asset table), but I can't figure out how to edit the SQL to add it in from the other table. Any help would be greatly appreciated! Current SQL is below:
select if(sum(if(DISPLAY_NAME like '%My Software Name%', 1, 0)) = 0, "Not Installed", "Installed") as INSTALLED, MACHINE.NAME,MACHINE.IP, MACHINE.LAST_SYNC, MACHINE.USER_LOGGED as USER_LOGGED
LEFT JOIN MACHINE_SOFTWARE_JT ON MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID
LEFT JOIN SOFTWARE ON MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
where MACHINE.CHASSIS_TYPE = "Desktop" or MACHINE.CHASSIS_TYPE = "Laptop"
group by MACHINE.NAME
order by INSTALLED, USER_NAME