Lesson 11.2 · Pro

Median from a count table

When data comes as "value, how many", expand it before taking a median, and drop duplicates first.

In this lesson

  1. Why you can't take the median of the rows
  2. Expand each row with generate_series
  3. Remove duplicate rows before the median