A method of efficiently providing estimated answers to workloads of
aggregate, multi-join SQL-like queries over a number of input
data-streams. The method only examines each data elements once and uses a
limited amount of computer memory. The method uses join graphs and atomic
sketches that are essentially pseudo-random summaries formed using random
binary variables. The estimated answer is the product of all the atomic
sketches for all the vertices in the query join graph. A query workload
is processed efficiently by identifying and sharing atomic sketches
common to distinct queries, while ensuring that the join graphs remain
well formed. The method may automatically minimize either the average
query error or the maximum query error over the workload.