Search⌘ K
AI Features

Solution: Group Things Together

Discover how to write SQL queries that group data and compute averages for each city. Learn to use the GROUP BY clause to summarize information effectively and gain insights from grouped data.

Query

SELECT city, AVG(age)
FROM people
GROUP BY city;

Explanation

This SQL query ...