I am guessing but maybe like this using AVG([Quality]) AS [Average Quality]
if the field the reading is sotred in is named Quality --
SELECT [SiteName_EC], Format([SampleTime],â€mm/dd/yyyy hh†AS [Sample Hour],
AVG([Quality]) AS [Average Quality]
FROM [YourTable]
GROUP BY [SiteName_EC], Format([SampleTime],â€yyyymmddhhâ€),
Format([SampleTime],â€mm/dd/yyyy hhâ€);
--
Build a little, test a little.
KenSheridan via AccessMonster.com said:
Group the query on the date/time column formatted to the hour, e.g.
SELECT Format([SampleTime],â€mm/dd/yyyy hh†AS [Sample Hour],
AVG([SiteName_EC]) AS [Average Quality]
FROM [YourTable]
GROUP BY Format([SampleTime],â€yyyymmddhhâ€),
Format([SampleTime],â€mm/dd/yyyy hhâ€);
The first group level is purely to ensure the correct order of the results.
Ken Sheridan
Stafford, England
Calif_Mike said:
I have water quality data that is stored at 15 minute intervals. I would
like to query it as an hourly average. Date and time stored together as
mm/dd/yyyy hh:mm. Water quality is stored as "SiteName_EC".
The query wisard will develop daily, monthly and yearly but not hourly
queries.
Thanks,
Mike
--
Message posted via AccessMonster.com
.