Looking for help with a select statement please

DavrosDalek

ADSM.ORG Member
Joined
Jan 15, 2009
Messages
26
Reaction score
2
Points
0
Hi All

I need to run a custom report from Operations center, this is so we car figure out charging for other departments etc etc
I was using the older Tivoli Storage Manager Administration Center but now need to move to Operation Center due to deprecated commands in version 8.1.8 of spectrum protect server. I don't have much experience with select statements.

I am currently using a select statement i found online that lists duplicated nodes, best deduplication first, here it is

SELECT SUBSTR(s.ENTITY,1,20) AS NODE, (CAST(FLOAT(SUM(s.bytes_protected))/1024/1024/1024 AS DECIMAL(12,2))) AS PROTECTED_GB, (CAST(FLOAT(SUM(s.dedup_savings))/1024/1024/1024 AS DECIMAL(12,2))) AS DEDUPSAVINGS_GB, (CAST(FLOAT(SUM(s.comp_savings))/1024/1024/1024 AS DECIMAL(12,2))) AS COMPSAVINGS_GB, COALESCE((CAST(FLOAT(SUM(s.dedup_savings))/FLOAT(SUM(s.bytes_protected))*100 AS DECIMAL(5,2))),0) AS DEDUP_PCT,(CAST(FLOAT(SUM(s.comp_savings))/FLOAT(SUM(s.bytes_protected)-SUM(s.dedup_savings))*100 AS DECIMAL(5,2))) AS COMP_PCT from summary_extended s WHERE DEDUP_SAVINGS<>0 and activity='BACKUP' or activity='ARCHIVE' GROUP BY S.ENTITY ORDER BY DEDUP_PCT DESC

Could somebody help me change this about so it displays nodes grouped by policy domain and then in name order with the same info as above ? (Node name, Protected_GB, DEDUPSAVINGS_GB, COMPSAVINGS_GB, DEDUP_PCT, COMP_PCT) We have policy domains called "GOLD", "SILVER" etc that differ by SLA / retention etc.

Thanks :)

Craig
 
Back
Top