You Got to love management,
I've been averaging for the last 12 records with this code:
SELECT AVG(LMP) AS Average FROM (SELECT TOP (12) LMP FROM dbo.LMP_5Min order by id desc)
I need to get the average for just the current hours data that comes in every 5 minutes. So there will be 12 records by the end of the hour. However I need to average each increment as it comes in. So after 1, 2, 3......
increments come in each would have to be averaged.
My tables goes as follows:
ID int, not null
View Complete Post