Q&A for professional and enthusiast programmers
select distinct top 1000 p.id as [Post Link], p.ClosedDate, p.AnswerCount from posts p inner join posthistory ph on ph.postid = p.id where (p.closeddate is not null and p.posttypeid = 1 -- Q and ph.posthistorytypeid = 10 -- closed and ph.comment in (1, 101)) -- dupe OR (p.answercount > 0) ---OR ((p.posttypeid=1) and (p.answercount > 0)) order by p.Id desc