Routing-Aware Query Optimization for Conserving Energy in Wireless Sensor Networks --