Most viewed question vs. sum of views - only percentage

0

Please login or register to vote for this query.

(click on this box to dismiss)

MathOverflow

Q&A for professional mathematicians

SELECT
  CAST(p.CreationDate AS Date),
---  MAX(p.ViewCount) AS [Maximum],
---  SUM(p.ViewCount) AS [Sum],
  ROUND((MAX(p.ViewCount))*100.0/(SUM(p.ViewCount)),2) AS [Percentage]
FROM Posts p 
WHERE (p.PostTypeId=1) 
   AND (p.CreationDate >= '##Date1?2020-01-01##') AND (p.CreationDate <= '##Date2?2021-01-01##')
GROUP BY CAST(p.CreationDate AS Date)
ORDER BY CAST(p.CreationDate AS Date)

Enter Parameters

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