1. A method of assigning sampling methods to each input stream for arbitrary query sets in a data stream management system, the method comprising: splitting all query nodes in a query directed acyclic graph (DAG) having multiple parent nodes into sets of independent nodes having a single parent; computing a grouping set for every node in each set of independent nodes; reconciling each parent node with each child node in each set of independent nodes; reconciling between multiple child nodes that share a parent node; and generating a final grouping set for at least one node describing how to sample an input stream for that node.