Session Ready
Exercise

Mean and Median

Compute the mean (avg()) and median assets of Fortune 500 companies by sector.

Use the percentile_disc() function to compute the median:

percentile_disc(0.5) 
WITHIN GROUP (ORDER BY column_name)
Instructions
100 XP
  • Select the mean and median of assets.
  • Group by sector.
  • Order the results by the mean.