fix db commit in aggregations
make use of sqla types symmetrical in aggregations