On Tue, 11 Aug 2009, John Drescher might have said: > On Tue, Aug 11, 2009 at 2:39 PM, John Lockard<jlock...@umich.edu> wrote: > > I have modified my query.sql to include some queries that > > I use frequently and I thought maybe someone else would > > find them useful additions. Also, I was wondering if anyone > > had queries which they find useful and would like to share.
Here are my custom queries. Mike # 17 :List pool space allocated by status SELECT Pool.Name AS Pool, VolStatus AS Status, sum(VolBytes) AS Size, count(*) AS Number FROM Media, Pool WHERE Media.PoolID = Pool.PoolId GROUP by Pool.Name, VolStatus ORDER by Pool.Name, VolStatus; # 18 :List Volumes by pool, name SELECT VolumeName AS Volume, VolMounts AS Mounts, VolErrors AS Errors, VolBytes AS Size, VolWrites AS Writes, VolStatus AS Status, Pool.Name AS Pool FROM Media, Pool WHERE Media.PoolID = Pool.PoolId ORDER by Pool.Name, VolumeName; # 19 :List Volumes by pool, age SELECT VolumeName AS Volume, VolMounts AS Mounts, VolErrors AS Errors, VolBytes AS Size, VolWrites AS Writes, VolStatus AS Status, LastWritten AS 'Last Written', Pool.Name AS Pool FROM Media, Pool WHERE Media.PoolID = Pool.PoolId ORDER by Pool.Name, LastWritten Desc; # 20 :List storage used by client and pool SELECT Client.Name AS Client, Pool.Name as Pool, sum(Job.JobFiles) as Files, sum(Job.JobBytes) as Bytes FROM Client, Job, Pool WHERE Job.ClientID = Client.ClientID and Job.PoolID = Pool.PoolID GROUP by Client.ClientID ORDER by Client.Name; ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users