user retention

1

Please login or register to vote for this query.

(click on this box to dismiss)

Mi Yodeya

Q&A for those who base their lives on Jewish law and tradition and anyone interested in learning more

--Percent of posting users who have posted on more than one day

select sum(case when numdays > 1 then 1 else 0 end) * 1.0 / count(*)
from
(
  select p.owneruserid, 
    count(distinct DATEADD(dd, DATEDIFF(dd, 0, creationdate), 0)) as numdays -- distinct dates
  from posts p
  where p.posttypeid = 1 or p.posttypeid = 2 -- Q&A only
  group by p.owneruserid ) counts

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results