What sort of questions are migrated here?

0

Please login or register to vote for this query.

(click on this box to dismiss)

English Language Learners

Q&A for speakers of other languages learning English

DECLARE @from datetime = getdate() - 90,
        @PostMigratedHere tinyint = 36,
        @PostMigratedAway tinyint = 35,
        @MigrationRejected tinyint = 42,
        @Question tinyint = 1;
 
select count(*) as 'Migrated here', 
       avg(Score*1.0) 'Avg score',
       avg(AnswerCount*1.0) 'Avg answers',
       avg(CommentCount*1.0) 'Avg comments',
       avg(datediff(hour, p.CreationDate, ph.CreationDate)/24.0) 'Avg age (days)'
from PostHistory ph
     join PostsWithDeleted p on p.Id = PostId
where PostHistoryTypeId In (@PostMigratedHere)
      and ph.CreationDate > @from

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results