work in progress

Set-Aggregate Functions

SELECT
  class_id,
  percentile_cont(0.5) WITHIN GROUP (ORDER BY score) AS median_score
FROM grades
GROUP BY 1
ORDER BY 2 DESC;

© 2022 Andrew Carlson. All rights reserved.