Primeras Publicaciones - Cantidad semanal y Demora media


Please login or register to vote for this query.

(click on this box to dismiss)

Literature Meta

Q&A for scholars and enthusiasts of literature

with FP AS (
  select DATEADD(week, DATEDIFF(week, 0, CreationDate), 0) AS InicioSemana,
  DATEDIFF(mi, CreationDate, DeletionDate) AS Demora
    from ReviewTasks
   where ReviewTaskTypeId = 4     -- First Posts
     and DeletionDate is not null -- finalizadas
     and DeletionDate < DATEADD(DD,-7,GETDATE() ) -- no esta semana
     and DeletionDate > DATEADD(year,-1,GETDATE()) -- último año

select top 200
      InicioSemana AS Semana,
      --convert(varchar(10), InicioSemana, 120) Semana,
      count(*) AS [Núm Primeras Publicaciones],
      avg(Demora) AS [Demora Media (mins)]
 from FP
group by InicioSemana -- DATEADD(week, DATEDIFF(week, 0, CreationDate), 0) -- agrup x Semana
order by InicioSemana desc

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results