Pixel is Awesome

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

DECLARE @pixelCreateDate datetime;
DECLARE @pixelRep int;

select @pixelCreateDate = CreationDate, @pixelRep = Reputation
  from Users
  where Id = 27134;
  
select distinct Users.DisplayName, Users.Reputation, Users.CreationDate, Users.LastAccessDate
  from Users
  where Users.Reputation < @pixelRep
    and DateDiff(mm, Users.CreationDate, @pixelCreateDate) > 18
    and DateDiff(dd, @pixelCreateDate, Users.LastAccessDate) > 0
    and (select count(*) from Posts
      where Users.Id = Posts.OwnerUserId
      and DateDiff(dd, @pixelCreateDate, Posts.CreationDate) > 0) > 0
    or Users.Id = 27134
  order by Reputation desc;

Enter Parameters

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