create table #spammers(accountid int, site sysname, creat...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

create table #spammers(accountid int, site sysname, creationdate datetime)


exec sede_ineachdb '
insert into #spammers
select accountid, [$site name$] site, creationdate
from users
where reputation = 1
and displayname like ''%spam%'' COLLATE Latin1_General_100_CI_AI
', 1 , 0 , 0, 0

select accountid [# spam profiles]
     , count(*) [# of sites]
     , min(creationdate) [min data]
     , max(creationdate) [max data]

from #spammers
where accountid is not null
group by accountid
order by count(*) desc, datediff(d, max(creationdate), min(creationdate)) desc

Enter Parameters

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