Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
QAZAFI
Yak Posting Veteran
50 Posts |
Posted - 2009-07-29 : 17:49:36
|
Hi Thereis there any way I can take the average of next three records avery time in the table. for example i have a tableCREATE TABLE #MyTable ( ID int NOT NULL, Number int NOT NULL )INSERT #MyTable(ID, Number)SELECT 1, 1 UNION ALLSELECT 2, 3 UNION ALLSELECT 3, 2 UNION ALLSELECT 4, 4 UNION ALLSELECT 5, 6 UNION ALLSELECT 6, 8 UNION ALLSELECT 7, 10I am expecting resultasID Avearge1 22 33 4 and so on is any body have any idea how can I do this with out using cursorsMany thanksQazafi |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|