Page 1 of 1
[SOLVED] Number of workstations to which a packet group is assigned
Published: January 23, 2020 - 2:17 PM
by Renaud Villet
Hello,
I'd like to create a query that will give me the number of machines on which a package group is installed...is that possible?
Thanks
Re: Number of workstations to which a packet group is assigned
Published: February 3, 2020 - 10:08 AM
by Mathieu
There is this script that you can modify according to what you want to display.
select package,version,architecture,description,section,package_uuid,count(*)
from hostpackagesstatus s
where section not in ('host','unit','group')
group by 1,2,3,4,5,6
You replace 'group' with 'base' to display only package groups
Re: Number of workstations to which a packet group is assigned
Published: February 4, 2020 - 4:58 PM
by Renaud Villet
Yes, it works, thank you!
Now for the trickier part: is it possible to get the number of computers to which a particular package group has been assigned, sorted by domain?
Thank you.
Re: Number of workstations to which a packet group is assigned
Published: February 5, 2020 - 9:44 AM
by Mathieu
I don't have that one in my list that I got through Tranquil IT, sorry
Re: Number of workstations to which a packet group is assigned
Published: February 17, 2020 - 4:50 PM
by eblaudy
Good morning,
Here's what you're looking for:
Code: Select all
SELECT hosts.dnsdomain, COUNT(hosts.uuid)
FROM hosts, hostpackagesstatus
WHERE hosts.uuid = hostpackagesstatus.host_id AND hostpackagesstatus.package = 'tis-wsl-debian'
GROUP BY hosts.dnsdomain
ORDER BY 2 DESC
Simply replace "tis-wsl-debian" with the name of your package group.
This works for any package name

Group or not!
Have a good rest of the day