EDQD: An Energy-Distance Aware Query-Based Data Aggregation Technique for Wireless Sensor Networks Data aggregation is a known technique addressed to improve bandwidth and energy consumption. Most of data aggregation methods are based on clustering. Clustering is a time-energy consumer procedure. On the other hand, choosing aggregator is very important in data aggregation. Energy level and distance to sink are two important factors to choose aggregators. Unfortunately, choosing the node with optimal energy level and distance both is difficult. This paper proposes an energy-distance aware query-based data aggregation technique; named EDQD, that it dose not need to cluster. When some neighbors witness an event, the EDQD method chooses best of them as aggregator by learning automata concept. Therefore, EDQD balances energy consumption in network and increases network lifetime. Finally, we simulate and evaluate our method by Glomosim simulator.