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
- Count only the rows you care about
- Count people who did something
- The shorter Postgres way: FILTER
- Turn conditional counts into rates
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.