Re: Select statement question
2005-05-04 09:13:57
Very nice!
Just what I needed!
DaveZ
Curtis Stewart
<Curtis.Stewart@L To: ADSM-L AT VM.MARIST
DOT EDU
AWSON.COM> cc:
Sent by: "ADSM: Subject: Re: [ADSM-L] Select
statement question
Dist Stor
Manager"
<[email protected]
.EDU>
05/04/2005 08:34
AM
Please respond to
"ADSM: Dist Stor
Manager"
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
|
|
|