|< < 41 > >|

Aggregation with grouping

Combining with other operations

Improved query:
select name, address, sum(unpaid) from purchase join customer using (customer_id) where age(purchase_date) > interval '1 year' group by customer_id, name, address

|< < 41 > >|