Calculating a cross-partition aggregate with an asynchronous query