|
Posted by Roy Harvey on 08/17/06 16:41
I believe this will do it.
SELECT Location,
dateadd(hour,datediff(hour,0,TimeDate),0) as Hourly,
avg(Data) as AvgData
FROM .....
GROUP BY
Location,
dateadd(hour,datediff(hour,0,TimeDate),0)
Roy Harvey
Beacon Falls, CT
On 17 Aug 2006 09:31:32 -0700, "Compliance" <comcontrol@aol.com>
wrote:
>Apologies for the simplicity of the question, but it reflects my
>capabilities! I have the following sample fields coming from different
>tables:
>
>Location
>TimeDate (timestamp)
>Data
>
>I need to return the average of Data per Location per HOUR.
>
>Thanks.
Navigation:
[Reply to this message]
|