Team... I need your help... SELECT Pickerid, Sum(Currentweight) AS TotalWeight, IIf(pickerhours=0,0,TotalWeight/pickerhours) FROM mergeddatabase WHERE ((Currentdate) between [Enter First Date Required:] and [Enter Last Date Required:]) GROUP BY pickerid, pickerhours; I have a access database (2003) single Table (mergeddatabase) with thousands of entries.. This is a query to work out picking rates. The criteria is a picker picks a box and information like currentdate, currentweight, pickerid, pickerhours etc is appended to each record. There are hundreds of records per pickerid each day. What Im trying to do is total all entries for that pickerid within a certain date range.. Ie pickerid = 1 date = 18/03/2012, currentweight = 4.06, hrs = 2 pickerid = 1 date = 19/03/2012, currentweight = 5.08, hrs = 2 pickerid = 4 date = 18/03/2012, currentweight = 4.09, hrs = 3 pickerid = 4 date = 19/03/2012, currentweight = 4.11, hrs = 5 So the result should show Pickerid 1, currentweight 9.14, avgweight = (currentweight / hrs) Pickerid 4, currentweight 8.2, avgweight = (currentweight / hrs) I hope this makes sense.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!