Changes to Daily Ingest Select

tsmguy

Active Newcomer
Joined
Sep 29, 2010
Messages
6
Reaction score
1
Points
0
Hi,

Could someone assist me in adjusting this select to pull for TB instead of MB?

SELECT n.platform_name, DATE(s.START_TIME) AS Date, (CAST(FLOAT(SUM(s.bytes))/1024/1024 AS DECIMAL(12,2))) AS DAILY_MB from summary s inner join nodes n on s.entity = n.node_name where activity='BACKUP' or activity='ARCHIVE' GROUP BY n.platform_name, DATE(S.START_TIME) order by 1,2

Also would there be a way to specify how many days to go back with this type of select statement?


TIA!
 
Hi, You just need to divide by 1024 two more times
/1024 = KB
/1024/1024 = MB
/1024/1024/1024 = GB
/1024/1024/1024/1024 = TB
 
thank you! that gave me what i needed :)

with this select i am pulling by platform. would you know if there is a way to modify it to pull by node_name? say *_sql or *_db2 etc, to get daily ingest by node by day?
 
I can't test it right now, but essentially remove the innerjoin portion
Replace "select n.platform ... "with "select entity ... " (entity is the node when it's a backup/archive)
Replace "GROUP BY n.platform_name, ..." with "GROUP BY entity, ..."
 
Back
Top