Abstract-Processing the gathered information efficiently is a key functionality for wireless sensor networks. In this article, we study the time complexity, message complexity (number of messages used by all nodes), and energy cost complexity (total energy used by all nodes for transmitting messages) of some tasks, such as data collection (collecting raw data of all nodes to a sink), data aggregation (computing the aggregated value of data of all nodes), and queries for a multi-hop wireless sensor network of n nodes. We first present a lower-bound on the complexity for the optimal methods, and then, for most of the tasks studied in this article, we provide an (asymptotically matching) upper-bound on the complexity by presenting efficient distributed algorithms to solve these problems.