PDQ Inventory SQL Query
I have contacted support but they don't support SQL queries and suggested I post here!
I have the following query
A.Name as 'Application Name',
COUNT(a.name) as 'Count',
GROUP_CONCAT(C.computerID,', ') AS 'Computer ID'
FROM Computers C
JOIN Applications A USING (ComputerID)
WHERE A.Name IN ('Software Package 1', 'Package 2', 'etc') AND <ComputerFilter>
GROUP BY A.NAME
ORDER BY COUNT
This works when it's run with against everything in Inventory however it doesn't work when run against a collection, I just receive
No such column: Computers.ComputerID SELECT
Could anyone advise as to what I'm doing wrong!?
I did some experimenting, and it looks like <ComputerFilter> can't handle the Computers table being renamed. Also, I added Applications.Version to the GROUP BY clause so versions don't get swallowed.
That worked, thankyou!!
Please sign in to leave a comment.