Short Questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Code Review

Q&A for peer programmer code reviews

Select q.Id as [Post Link],
       q.Score as Score,
       q.AnswerCount as Answers,
       Len(q.Body) as Size,
       q.CreationDate as Asked,
       op.Reputation as OP_RepScore,
       op.LastAccessDate as OP_LastSeen,
       sum(case when p.CreationDate < q.CreationDate then 1 else 0 end) as OP_PostCount
from Posts q
  inner join Users op on q.OwnerUserId = op.Id
  inner join Posts p on op.Id = p.OwnerUserId
where q.ClosedDate is null
  and q.Score > 2
  and Len(q.Body) < 512
  and q.AnswerCount > 2
  and p.PostTypeId in (1,2)
  and p.CreationDate <= q.CreationDate
group by q.Id, q.Score, q.AnswerCount, len(q.body), q.CreationDate, op.Reputation, op.LastAccessDate
--having sum(case when p.CreationDate < q.CreationDate then 1 else 0 end) = 0

Enter Parameters

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