Sharing Aggregate Computation for Distributed Queries