Preguntas más respondidas por mes

1

Please login or register to vote for this query.

(click on this box to dismiss)

Preguntas más respondidas.

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @anio int = ##Anno?2016##;
DECLARE @mes int = ##Mes?1##;

WITH Answers AS (
  SELECT ParentId AS Id, max(Score) AS Score
  FROM Posts
  WHERE PostTypeId = 2
  GROUP BY ParentId
)

SELECT TOP 100
  CURRENT_TIMESTAMP "Creación",
  CONCAT('site://q/',Q.Id,'|',Q.Title) Pregunta,
  Q.AnswerCount "Cantidad de Respuestas",
  Q.Score "Puntaje de Pregunta",
  A.Score "Puntaje de Mejor Respuesta"

FROM Posts Q
LEFT OUTER JOIN Answers A
  ON Q.Id = A.Id
WHERE
  Q.CreationDate >=    CONCAT(@anio  ,'/',@mes,'/1')
  and Q.CreationDate < CONCAT(@anio,'/',@mes+1,'/1')
ORDER BY
  3 DESC,
  5 DESC,
  4 DESC,
  1 DESC,
  Q.Title ASC
;

Enter Parameters

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