Q&A for professional and enthusiast programmers
SELECT P.Title, 'http://stackoverflow.com/questions/' + CAST(P.Id AS nvarchar), (SELECT Count(P2.Id) AS PCount FROM Posts P2 WHERE P2.PostTypeId=2 AND P2.ParentId = P.Id), (SELECT Count(V.Id) AS VCount FROM Votes V WHERE V.PostId = P.Id AND V.VoteTypeId = 5), (SELECT Count(C.Id) AS CCount FROM Comments C WHERE C.PostId = P.Id) FROM Posts P, PostTypes Pt, Users U, Comments C, PostHistory Ph, Votes V, VoteTypes VT, PostHistoryTypes Pht WHERE Pt.Id = P.PostTypeId AND P.Id = C.PostId AND U.Id = C.UserId AND P.Id = V.PostId AND P.Id = Ph.PostId AND Vt.Id = V.VoteTypeId AND Pht.Id = Ph.PostHistoryTypeId AND Pt.Id = 1 AND Vt.Id = 5 AND C.Score > 0 AND Pht.Id = 16 AND P.ClosedDate is null AND P.AcceptedAnswerId is not null AND P.ParentId is null AND P.Title is not null AND P.LastEditDate is not null AND P.LastActivityDate is not null