This will do a daily comparison. You can easily modify it to do weekly, monthly, quarterly, etc.set nocount oncreate table #log_web (i int IDENTITY(1,1) PRIMARY KEY CLUSTERED, added smalldatetime NOT NULL DEFAULT (getdate()), pagename varchar(20) NOT NULL, times int NOT NULL)insert #log_web (added , pagename, times) values ('2002-07-20' , 'www.sqlteam.com', 125)insert #log_web (added , pagename, times) values ('2002-07-20' , 'www.yahoo.com', 40)insert #log_web (added , pagename, times) values ('2002-07-20' , 'www.cnn.com', 55)insert #log_web (added , pagename, times) values ('2002-07-21' , 'www.sqlteam.com', 195)insert #log_web (added , pagename, times) values ('2002-07-21' , 'www.yahoo.com', 31)insert #log_web (added , pagename, times) values ('2002-07-21' , 'www.cnn.com', 60)-- show all records and their percent changeprint '*** All records ***'select b.pagename , a.times as Prev_Times, b.times , Pct_Chg = Convert(numeric(8,2), (b.times / Convert(numeric(8,2), a.times)))from #log_web binner join #log_web aon b.added = DateAdd(d, 1, a.added) and b.pagename = a.pagename-- show only those records that exceed defined thresholdprint ''print '*** Outlier records ***'select b.pagename , a.times as Prev_Times, b.times , Pct_Chg = Convert(numeric(8,2), (b.times / Convert(numeric(8,2), a.times))) from #log_web binner join #log_web aon b.added = DateAdd(d, 1, a.added) and b.pagename = a.pagenamewhere not ( (b.times / Convert(numeric(8,2), a.times)) between .80 and 1.20)-- drop table #log_web--here is the output:*** All records ***pagename Prev_Times times Pct_Chg -------------------- ----------- ----------- ---------- www.sqlteam.com 125 195 1.56www.yahoo.com 40 31 .78www.cnn.com 55 60 1.09 *** Outlier records ***pagename Prev_Times times Pct_Chg -------------------- ----------- ----------- ---------- www.sqlteam.com 125 195 1.56www.yahoo.com 40 31 .78