vishal veerkar wrote: > After trying some combination with other queries finally i got the break > through...below query gives the output for All clients utilization in GB for > specified time window...this may helpful for others > > :List storage used by client and pool after specified time window > *Enter Start time in YYYY-MM-DD HH:MM:SS format: > *Enter End time in YYYY-MM-DD HH:MM:SS format: > SELECT Client.Name AS Client, Pool.Name as Pool, > sum(Job.JobFiles) as Files, sum(Job.JobBytes)/(1024*1024*1024) as > TotalSizeGb > FROM Client, Job, Pool > WHERE Job.ClientID = Client.ClientID and Job.PoolID = Pool.PoolID > AND JobStatus='T' > AND Job.StartTime >= '%1' > AND Job.StartTime <= '%2' > GROUP by Client.ClientID > ORDER by Client.Name;
You still have Pool.Name listed in the SELECT list but not in the GROUP BY clause. I would suggest (to give standard SQL code), that you change the "GROUP BY clause to "GROUP BY Client.Name, Pool.Name". You might want to update the ORDER BY in the same way. -- Mike Holden http://www.by-ang.com - the place to shop for all manner of hand crafted items, including Jewellery, Greetings Cards and Gifts ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users