select sum(ViewCount) from Posts q join PostHistory h on ...

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 sum(ViewCount)
from Posts q
join PostHistory h on h.PostId=q.Id and PostHistoryTypeId=10 and Comment in ('1','101')
where datediff(day, q.CreationDate, ClosedDate) <=1 -- be conservative and only count quickly-closed duplicates

Enter Parameters

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