-- report number of files in each backup

select
	shares.name,
	hosts.name,
	backupnum,
	count(*)
from files
join shares on shareid=shares.id
join hosts on hostid = hosts.id
group by shares.name, hosts.name, backupnum
order by hosts.name, shares.name, backupnum;
