#315 Add basic support for aggregation functions