Non-returning users per month as a function of reputation.
Q&A for professional robotic engineers, hobbyists, researchers and students
-- User drop-off with reputation -- Non-returning users per month as a function of reputation. create table #Temp (month int) declare @counter int set @counter = 0 while @counter <= 20 begin insert #Temp(month) values(@counter) set @counter = @counter + 1 end select * from Users inner join #Temp on DATEDIFF (month,Users.LastAccessDate,GETDATE()) = #Temp.month where Users.Reputation between 5000 and 6000 --select Year(LastAccessDate), Month(LastAccessDate), count(*) from Users --where reputation between 5000 and 6000 --group by Year(LastAccessDate), Month(LastAccessDate) --Order by Year(LastAccessDate) desc, Month(LastAccessDate) desc