Combining Aggregation and Sampling (Nearly) Optimally for Approximate Query Processing | Synapse