Aggregate stats for non-ID-requests

1

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

WITH FilteredPosts AS (
  SELECT *
  FROM Posts
  WHERE PostTypeId = 1 AND Tags <> '<identify-this-%>'
)

SELECT 'Minimum', MIN(Score)
FROM FilteredPosts

UNION

SELECT DISTINCT 'Median', PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY Score) OVER ()
FROM FilteredPosts

UNION

SELECT 'Mean', ROUND(AVG(CAST(Score AS float)), 2)
FROM FilteredPosts

UNION

SELECT 'Maximum', MAX(Score)
FROM FilteredPosts

UNION

SELECT 'StdDev', ROUND(STDEV(Score), 2)
FROM FilteredPosts

Enter Parameters

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