Aggregate stats for non-ID-requests

0

Please login or register to vote for this query.

(click on this box to dismiss)

Internet of Things Meta

Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors

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