Open Community Wiki Questions with the most Answers and Favorites

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 P.Title, 'http://stackoverflow.com/questions/' + CAST(P.Id AS nvarchar)
FROM Posts P
WHERE 
(SELECT Count(P2.Id) FROM Posts P2, PostTypes Pt WHERE P.Id = P2.ParentId AND Pt.Id = P2.PostTypeId AND Pt.Id=2) > 4
AND (SELECT Count(V.Id) FROM Votes V, VoteTypes Vt WHERE P.Id = V.PostId AND Vt.Id = V.VoteTypeId AND Vt.Id = 5) > 2
AND (SELECT Count(C.Id) FROM Comments C, Users U WHERE U.Id = C.UserId AND P.Id = C.PostId) > 1
AND (SELECT Count(Ph.Id) FROM PostHistory Ph, PostHistoryTypes Pht WHERE P.Id = Ph.PostId And Pht.Id = Ph.PostHistoryTypeId AND Pht.Id = 14) = 0
AND P.ClosedDate IS NULL
AND P.Title IS NOT NULL
AND P.OwnerUserId = 1

Enter Parameters

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