Lesson 3.2 · Pro

Count and sum only some rows

Put several conditional counts side by side in one query, without WHERE.

In this lesson

  1. Count only the rows you care about
  2. Count people who did something
  3. The shorter Postgres way: FILTER
  4. Turn conditional counts into rates