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]
, string_agg(convert(nvarchar(max), site), N' ,') [sites]
     , min(creationdate) [min data]
     , max(creationdate) [max data]

from #spammers
group by accountid

Enter Parameters

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