how can I list questions which has (one or more answers) or marked as duplicate?


Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

select distinct top 500 as [Post Link], as [Post ID], as [User ID],us.displayname as [User Name],p.title as [Question Titles],
p.body as [Question Body], p.AnswerCount as [Total Answers], as [Answer ID],
a.body as [Answers], a.ownerdisplayname as [Author Name],p.LastEditorDisplayName,
cm.Text as Comments
--a.AboutMe as [Author Profile], a.UpVotes as [Up Votes], a.Reputation
from posts p
inner join posthistory ph 
   on ph.postid =
inner join Posts a
   on p.Id = a.ParentId
inner join users us
   on p.OwnerUserId =
inner join Comments cm
   on a.Id = cm.PostId
where (
p.closeddate is not null
and p.AcceptedAnswerId is not null
and p.posttypeid = 1 -- Q
and ph.posthistorytypeid  = 10 -- closed
and ph.comment in (1, 101)) -- dupe
and (p.answercount > 5)
---OR ((p.posttypeid=1) and (p.answercount > 0))
order by p.Id asc

Enter Parameters

Switch to main site
loading Hold tight while we fetch your results