I use the following select node_name, count (distinct volume_name) as Numvols,stgpool_name from volumeusage group by node_name, stgpool_name
I don't believe you are dong anything wrong. Also you can't use these value to sum up to equal to total number of tapes used because some of data is spread across multi tapes. Thanks, Sung Y. Lee "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> wrote on 11/18/2005 03:19:05 PM: > Hello, > > I am trying to find out the number of onsite & offsite tapes that a > particular group of nodes are using. I have been using the following > select statement: > > select distinct count(*) as "Volume Count",node_name from volumeusage where > stgpool_name like 'COPY%' and node_name like 'FJSU%' group by node_name > > select distinct count(*) as "Volume Count",node_name from volumeusage where > stgpool_name like 'TAPE%' and node_name like 'FJSU%' group by node_name > > but the results I get are adding up to more than the total number of tapes > that are being used by the environment, so I believe that I am getting > incorrect data. Could someone please let me know what I might be doing > wrong? Thanks! > > ******************************** > Joni Moyer > Highmark > Storage Systems, Systems Programmer > Work:(717)302-6603 > (717)302-9966 (NEW NUMBER as of 11/17/2005) > (717) 302-9826 (NEW FAX after 11/17/2006) > [EMAIL PROTECTED] > ********************************