﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / T-SQL  / Help !! Calculate Rolling average for last 4 weeks / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 18 Jun 2013 16:20:01 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Help !! Calculate Rolling average for last 4 weeks</title><link>http://www.sqlservercentral.com/Forums/Topic1398761-8-1.aspx</link><description>Duplicate post, please post all replies [url=http://www.sqlservercentral.com/Forums/Topic1398763-392-1.aspx][b]here[/b][/url].</description><pubDate>Wed, 19 Dec 2012 22:35:54 GMT</pubDate><dc:creator>Lynn Pettis</dc:creator></item><item><title>Help !! Calculate Rolling average for last 4 weeks</title><link>http://www.sqlservercentral.com/Forums/Topic1398761-8-1.aspx</link><description>Hi All,I need your help.Database: SQL SERVER 2008R2I want to calculte for a year and a week the average of value of the 4 last weeks.I have data a table like that:YEAR	   WEEKS VALUE                                      2012	    1	       30002012	    2	       50002012	    3	       60002012	    4	       70002012	    5	       80002012	    6	       90002012	    7	       10002012	    8	       6000And I want that :YEAR	   WEEKS      VALUE                                      2012	    1	        ( Average value for week 49, 50, 51, 52 for the year 2011)2012	    2	        ( Average value for week 50, 51, 52 for the year 2011 and week 1 for the year 2012)2012	    3	        ( Average value for week 51, 52 for the year 2011 and week 1, 2 for the year 2012)2012	    4	        ( Average value for week 52 for the year 2011 and week 1, 2, 3 for the year 2012)2012	    5	       5250 -&amp;gt; (  Average value for  week 1, 2, 3 , 4 for the year 2012)2012	    6	       6500 -&amp;gt; (  Average value for  week 2, 3 , 4, 5 for the year 2012)Thank U for your help</description><pubDate>Wed, 19 Dec 2012 21:24:47 GMT</pubDate><dc:creator>Lidou123</dc:creator></item></channel></rss>