1. A method comprising: determining, using a processor, a set of aggregate queries to be executed on a data stream, the set of aggregate queries comprising queries that perform respective sets of aggregation operations on respective sets of attribute values over respective time intervals; generating, using the processor, at least one intermediate aggregate query for a subset of the set of aggregate queries, said at least one intermediate aggregate query combining a subset of aggregation operations for the subset of aggregate queries and a subset of attribute values; executing, using the processor, said at least one intermediate aggregate query to generate pre-aggregated data from the data stream for the subset of aggregate queries; and executing, using the processor, the subset of aggregate queries on the pre-aggregated data subsequent to executing said at least one intermediate aggregate query; wherein each of at least two aggregate queries in the subset of aggregate queries comprises: a number of group-by attributes on which aggregation is performed; and a time interval over which aggregation is performed.