Query Quest PostgreSQL Course

Group & count

Aggregate functions summarize rows. COUNT(*) counts them. GROUP BY creates one summary per distinct value.

What you'll learn

Every selected column that is not aggregated must appear in GROUP BY.

Your mission

Count players in each realm. Return realm and player_count.

Enable JavaScript to run SQL in the interactive lesson.