How to Exract SQL minute data to houly data in C#?
Hi
I have a SQL table that has data filled with million records and the date is in minutes it looks like :-
| RowDateTime | Meter 1 | Meter 2 | Meter 3 |
| 25/05/2006 02:49:00 | 1220 | 450 | 489 |
| 25/05/2006 02:50:00 | 1223 | 470 | 500 |
| 25/05/2006 02:51:00 | 1227 | 490 | 511 |
| 25/05/2006 02:52:00 | 1230 | 510 | 522 |
| 25/05/2006 02:53:00 | 1233.5 | 530 | 533 |
| 25/05/2006 02:54:00 | 1236.9 | 550 | 544 |
| 25/05/2006 02:55:00 | 1240.3 | 570 | 555 |
| 25/05/2006 02:56:00 | 1243.7 | 590 | 566 |
I want to make a C# code or SQL query to the above table and convert the data to houlry by summing Meter1,Meter 2 and Meter 3 to be the average. I want to import all the hourly data to a new table that will look like :-
| RowDateTime | Meter 1 | Meter 2 | Meter 3 |
| 25/05/2006 03:00:00 | 9854.4 | 4160 | 527.5 |
| 25/05/2006 04:00:00 | 8634.4 | 3710 | 533 |
| 25/05/2006 05:00:00 | 7411.4 | 3240 | 538.5 |
Your help will be highly appreciated.

