Post Migration from and to

0

Please login or register to vote for this query.

(click on this box to dismiss)

Displays number of post migrated per site

Operations Research Meta

Q&A about the site for operations research and analytics professionals, educators, and students

-- Enter Query Title
-- Enter Query Description

Select 
Left(replace(f.Comment,'to http://',''), CharIndex('/', replace(f.Comment,'to http://',''))-1)
,   
Left(replace(t.Comment,'from http://',''), CharIndex('/', replace(t.Comment,'from http://',''))-1)
,
Count(distinct f.PostId) 
From PostHistory f join PostHistory t 
On f.PostId = t.PostId
Where f.PostHistoryTypeId = 35 and t.PostHistoryTypeId = 36
-- And Len(ltrim(rtrim(f.Text))) > 0
Group By Left(replace(f.Comment,'to http://',''), CharIndex('/', replace(f.Comment,'to http://',''))-1)
,
Left(replace(t.Comment,'from http://',''), CharIndex('/', replace(t.Comment,'from http://',''))-1)
Order by 2 desc

Enter Parameters

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