select accountid into #users from users where reputation ...

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 accountid 
into #users
from users
where reputation = 1
and creationdate >= '##year##-01-01'
AND datediff(hour, Creationdate, Lastaccessdate) < 504
and not exists(select 1 from posts where owneruserid = users.id)
and not exists(select 1 from badges where userid = users.id and name <> 'Autobiographer')
and not exists(select 1 from votes where userid = users.id)
and users.accountid not in (7585603)

select *
from #users

Enter Parameters

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