change aggregation function in tendencies endpoint