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

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

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]
     , concat('https://stackexchange.com/users/', accountid, '| account') [Link] 
     , 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