Vicious Dog based on Accepts

8

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select COUNT(*), qpc.QuestionerPosts as OutOf, MAX(a.CreationDate) as LastOccurance, q.OwnerUserId as [User Link], qu.UpVotes as AskerUp, qu.Reputation as AskerReputation, au.DisplayName, a.OwnerUserId as [User Link], (cast(COUNT(*) as decimal)/cast(qpc.QuestionerPosts as decimal)) as PercentSuspicious, au.Reputation as AnswererReputation, apc.AnswererPosts, qpc.QuestionerPosts as AskerPosts
from Posts q
inner join Posts a on q.AcceptedAnswerId=a.Id
inner join Users qu on qu.Id = q.OwnerUserId
inner join Users au on au.Id = a.OwnerUserid
inner join (select COUNT(*) as AnswererPosts, OwnerUserId from Posts GROUP BY OwnerUserId) apc on apc.OwnerUserId=au.Id
inner join (select COUNT(*) as QuestionerPosts, OwnerUserId from Posts GROUP BY OwnerUserId) qpc on qpc.OwnerUserId=qu.Id
where qu.Id != au.Id
and au.Reputation>15
group by au.DisplayName, qu.UpVotes, q.OwnerUserId, a.OwnerUserId, au.Reputation, qu.Reputation, apc.AnswererPosts, qpc.QuestionerPosts
having COUNT(*)>2 AND (cast(COUNT(*) as decimal)/cast(qpc.QuestionerPosts as decimal))>0.6
and au.Reputation<=5000
-- and MAX(a.CreationDate) >= DATEADD(m, -6, current_timestamp)
and au.DisplayName like 'Bmy%'
order by LastOccurance desc

Enter Parameters

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