Filter Aggregated Heights With HAVING

Postgres Engine
Database Schema
Question (#40)
Retrieve (province_id, sum_height) for each province, where sum_height is the total height of all patients in that province. Requirement: only show provinces where sum_height is 4500 or more.
Expected Output
Query Editor
User Output Ready
Execute a query or press Ctrl+Enter to view results...
Databases & Questions
Hint
Filtering on the sum of a group needs a different clause than filtering on a single row.
Official Solutions
Select a solution...