conservative estimate of users unaware of accept feature

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @illegit as table
( NQuestions int, IllegitRatio float, NTotalUsers int);

-- from results of http://data.stackexchange.com/stackoverflow/revision/397295/510705/users-without-accepted-answers
insert into @illegit
values (1,0.2956750271918373,798953),
(2,0.17610130562388532,248387),
(3,0.10260030368893253,129299),
(4,0.06360938768585728,82523),
(5,0.035505849965588435,58120),
(6,0.020573708654582218,42417),
(7,0.0073364528577071495,32911),
(8,0.0014863295733968229,25621);

select UnawareUsers,TotalNoviceUsers,UnawareUsers/TotalNoviceUsers Share
from
(
  select sum(NTotalUsers*IllegitRatio) as UnawareUsers,
  sum(NTotalUsers) as TotalNumber
  from @illegit
) as g,
(
select count(Id) TotalNoviceUsers
from
  (
  select Users.Id Id,count(Posts.Id) Questions
  from
  Users
  join Posts on Users.Id=Posts.OwnerUserId
  where Posts.PostTypeId=1
  group by Users.Id
  ) as h
where Questions<=8
) as i
;

Enter Parameters

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