User drop-off with reputation

0

Please login or register to vote for this query.

(click on this box to dismiss)

Non-returning users per month as a function of reputation.

Robotics

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

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results