select count(*) from Posts q inner join Posts a on q.Id =...

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

select count(*)
from Posts q
inner join Posts a on q.Id = a.ParentId
where q.OwnerUserId = a.OwnerUserId
and q.PostTypeId = 1 and a.PostTypeId = 2
and q.Score >= 10 and a.Score >= 20
and q.CommunityOwnedDate is null and a.CommunityOwnedDate is null
and a.Id = (select top 1 Id from Posts where ParentId = q.Id order by Score desc)
and q.CreationDate >= '2013-01-01'

Enter Parameters

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