add support for order by aggregate func