Re: Select statement question
2005-05-04 08:35:36
Here's what I use...
select
nodes.domain_name,summary.activity,sum(cast(summary.bytes/1024/1024/1024
as decimal(6,2)))
as GB from nodes, summary where (end_time between current_timestamp - 24
hours and
current_timestamp) and (activity='BACKUP' or activity='RESTORE' or
activity='ARCHIVE' or
activity='RETRIEVE') and ((nodes.node_name=summary.entity)) group by
domain_name,summary.activity
order by activity,domain_name asc
curtis.stewart AT lawson DOT com
Dave Zarnoch <zarnocd AT NATIONWIDEPROVIDENT DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
05/04/2005 07:26 AM
Please respond to
"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
To
ADSM-L AT VM.MARIST DOT EDU
cc
Subject
Select statement question
Folks,
I have a select statement that I use to determine the amount of MB backed
up during a specific time period:
(e.g.)
SELECT entity AS "Node name",CAST(sum(bytes/1024/1024) AS decimal(8,2)) AS
"MB xfer" FROM summary WHERE activity='BACKUP' AND start_time>=
'2005-04-01
06:00' AND
end_time<= '2005-04-07 06:00' GROUP BY entity
How would I include the "Policy Domain Name"?
Thanks!
DaveZ
|
|
|