Combining the average of multiple rows into one
Hello
I'm new to sql server and I'm having a slight problem!
ID FeederTotal Hour Minute
20 400 5 1
160 350 5 1
300 40010 5 1
40 200 20 12
180 210 20 12
300 180 20 12
This is an extract, the data is 24 hour data, many days of them mixed. I want the result to be:
NewID FeederTotal Hour Minute
20 383.33 5 1
100 196.67 20 12
The new FeederTotal is the average of all the totals.
Is there a short way to do this?
Thanks
Franco
|