find duplicates that have their targets as duplicates

1

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(*)
--top 100
--pl.postid as [Post Link]
--, pl.creationdate as [Closed On]
from postlinks pl, postlinks pl2
where pl.linktypeid = 3 -- duplicate
AND MONTH(pl.creationdate) =  ##Month##
AND YEAR(pl.creationdate) = ##Year##
--AND pl.creationdate >= CAST(CURRENT_TIMESTAMP AS DATE)
AND pl.relatedPostid = pl2.postid
AND pl2.linktypeid = 3
--ORDER BY pl.creationdate DESC

Enter Parameters

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