select distinct packages.name as `package`, groups.name as `group`
from
	packages left join package_group
		on packages.id=package_group.package
		left join groups
		on package_group.group=groups.id,
	files
where files.package=packages.id
and files.path='usr/share/icons/hicolor/'
and packages.repository=2
order by groups.name, packages.name;
