1 -- report number of files and staticics for each backup
7 abstime(backups.date) as backup_date,
9 abstime(min(files.date)) as from,
10 abstime(max(files.date)) as to,
12 sum(files.size) as size,
13 sum(backups.size) as backup_size
15 join shares on files.shareid=shares.id
16 join hosts on shares.hostid = hosts.id
17 join backups on shares.hostid = backups.hostid
18 and files.backupnum = backups.num
19 and shares.id = backups.shareid
20 group by shares.name, hosts.name, backupnum, backups.date, backups.type
21 order by backups.date;