Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 545 Bytes

SQL-Statistics-MIN-MEDIAN-MAX.md

File metadata and controls

20 lines (16 loc) · 545 Bytes

For this challenge you need to create a simple SELECT statement. Your task is to calculate the MIN, MEDIAN and MAX scores of the students from the results table.

Tables and relationship below:

Resultant table:

  • min
  • median
  • max
-- Create your SELECT statement here
SELECT 
  MIN(score) AS min, 
  PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY score) AS median,
  MAX(score) AS max
FROM result;