Average score per hundred views

1

Please login or register to vote for this query.

(click on this box to dismiss)

Tezos

Q&A for users, experts, and developers of the Tezos blockchain project

;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 meta site
loading Hold tight while we fetch your results