Recent developments in hardware have enabled the widespread deployment of sensor networks consisting of small sensor nodes with sensing, computation, and communication capabilities. Sensor data are subject to several sources of errors resulting from power limitations, wireless communication, latency, throughput, and various environmental effects. Such errors may seriously impact the answer to any query posed in the network. An energy efficient approach to query processing is introduced in this paper by implementing new optimization techniques applied to in-network aggregation. We first discuss earlier approaches in sensors data management and highlight their disadvantages. We then present our approach and evaluate it through several simulations to prove its efficiency, competence and effectiveness.