PDQ Inventory Application Summery Report
I'd like to create a report that shows which version of which application is installed on which computer.
Here you can see what I'd like to have:
I think, I can get all the required data using this query:
SELECT
Computers.Name as "Computer Name",
Applications.Name,
Applications.Version
FROM Computers
JOIN Applications USING (ComputerId)
UNION SELECT 'Count (latest)', * FROM (
SELECT 0, 0 FROM Computers
-- count rows (like "%latest%")
)
UNION SELECT 'Count (old)', * FROM (
SELECT 0, 0 FROM Computers
-- count rows (like "%old%")
)
The result looks like this:
Computers.Name - Applications.Name - Applications.Version
Count (latest) - 0 - 0
Count (old) - 0 - 0
PC1 - 7-Zip - 19.00
PC1 - Notepad++ - 14.2
PC2 - 7-Zip - 18.00
...
Now I just need to transform the data, unfortunately sqlite does not offer the pivot function, how can I manually "pivot" the data? I already read this post: https://community.pdq.com/posts/9397-inventory-number-environment-variable-doesnt-show?sort=oldest - the diffrence is that I don't know which column will be there, because I won't put all application names (> 100) in a case check.
I know that there might be some other problems, let's try to solve the first problem first.
Thanks in advance.
Comments
PDQi has a built in report named Applications that does exactly this.
No, the built in Applications report doesn't do exactly this. I'd like to group the rows by the computer name and create for each application one column.
OK, I misunderstood. The built in report can group the computers and display the applications by row, not column.
Ok, but I get a few pages (arround 200) if I do this, isn't there another way? I mean I just need to switch the columns and the rows, am I overseeing something?
The only way I know how to do it is to import the raw data into Excel and create a pivot table there.