select top(2) * from posts as a right join posthistory as...


Please login or register to vote for this query.

(click on this box to dismiss)

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

select top(2)
  --datepart(year, a.CreationDate),
  posts as a
  right join posthistory as ph on ph.PostId = a.ParentId
  left join posts as q on q.Id = ph.PostId
  (1 = 1)
  and a.PostTypeId = 2
  and q.PostTypeId = 1
  and (
    ph.PostHistoryTypeId = 10 and ph.CreationDate < a.CreationDate
  --and q.ClosedDate < a.CreationDate
group by
  datepart(year, a.CreationDate)
order by
  datepart(year, a.CreationDate) asc*/

Enter Parameters

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