1. A method of assigning sampling methods to each input stream for arbitrary query sets in a data stream management system, tile 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 via a processor 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 based on the reconciliation between the multiple child nodes that share the parent node for at least one node describing how to sample an input stream for the at least one node.