Average score per hundred views

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow Meta en español

Preguntas y respuestas sobre el sitio para programadores y profesionales de la informática

;with counts_cte AS 
(SELECT eomonth(p.CreationDate) AS Cmonth,
  SUM(Score) AS Score,
  SUM(ViewCount) AS Views
FROM Posts p
WHERE PostTypeId=1
GROUP BY eomonth(p.CreationDate)
)

SELECT
  Cmonth,
  100*(CAST(Score AS decimal))/(CAST(Views AS decimal)) AS [Score per view]
FROM counts_cte
ORDER BY Cmonth

Enter Parameters

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