Fastest-closed questions with 5 close votes

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

--SELECT TOP 100 p.Id as [Post Link], p.CreationDate as [Create Date],
--              p.ClosedDate as [Close Date]
--  from Posts p, Votes v
--  where p.PostTypeId = 1 and DATEDIFF(DAY, p.CreationDate, p.ClosedDate) < 1
  
  
--  order by p.ClosedDate - p.CreationDate asc

--select p.id, count(v.postid) from posts p, votes v
--where p.id = v.postid
--and v.votetypeid = 6
--group by v.postid, p.id

SELECT TOP 10 p.Id as [Post Link]--,
              --p.CreationDate as [Create Date],
              --p.ClosedDate as [Close Date]
FROM Posts p, Votes v
WHERE p.Id = v.PostId
AND v.VoteTypeId = 6
AND p.PostTypeId = 1
AND DATEDIFF(DAY, p.CreationDate, p.ClosedDate) < 1
GROUP BY p.Id

Enter Parameters

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