Hi,
Can some help me with the following problem I’m trying to create a query which gives me the Average for a day?
I created the next query, but it’s not reporting one Average value.
----------------------------
SELECT drive, round((cast((avg(sessions)) AS DECIMAL(10,0))),2) as 'conn', rate, round((cast((avg(rate)) AS DECIMAL(10,0))/1024),2) as 'load' From nsrTape
where convert(char(10),GETDATE(),103) = convert(char(10),nsrTape.time_,103)and operation = 'write' and sessions > '0'
Group by drive, rate
---------------------------
Result of this query is:
Drive conn rate load
\\\\.\\Tape0 1 576 .560000
\\\\.\\Tape0 1 1270 1.240000
\\\\.\\Tape0 1 1571 1.530000
\\\\.\\Tape0 1 2551 2.490000
\\\\.\\Tape0 1 2998 2.930000
I like to get the following result:
Drive conn rate load
\\\\.\\Tape0 1 1793.2 1.750000
All help is welcome
/Navmen
Can some help me with the following problem I’m trying to create a query which gives me the Average for a day?
I created the next query, but it’s not reporting one Average value.
----------------------------
SELECT drive, round((cast((avg(sessions)) AS DECIMAL(10,0))),2) as 'conn', rate, round((cast((avg(rate)) AS DECIMAL(10,0))/1024),2) as 'load' From nsrTape
where convert(char(10),GETDATE(),103) = convert(char(10),nsrTape.time_,103)and operation = 'write' and sessions > '0'
Group by drive, rate
---------------------------
Result of this query is:
Drive conn rate load
\\\\.\\Tape0 1 576 .560000
\\\\.\\Tape0 1 1270 1.240000
\\\\.\\Tape0 1 1571 1.530000
\\\\.\\Tape0 1 2551 2.490000
\\\\.\\Tape0 1 2998 2.930000
I like to get the following result:
Drive conn rate load
\\\\.\\Tape0 1 1793.2 1.750000
All help is welcome
/Navmen