duplicate titles with link

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

with duplicates as (
  select
    rtrim(lower(p.Title)) dupTitle,
    count(p.Title) dupCount
  from Posts p
  group by rtrim(lower(p.Title))
  having count(p.Title) > 1
)
select p.Tags,
       'site://q/' + cast(p.Id as nvarchar) [Link],
       p.Title,
       dupCount,
       p.Score [Score],
       p.AnswerCount [Answers],
       p.LastEditDate [Last Edit],
       p.ClosedDate [Closed]
from Posts p
join duplicates on p.PostTypeId = 1
                   AND rtrim(lower(p.Title)) = dupTitle
order by dupCount desc, dupTitle asc

Enter Parameters

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