The data aggregation highly reduces the energy consumption in the network and hence their is a requirement for involving aggregation of data from multiple nodes. These techniques are considered as remove the crucial for successful applications in Wireless Sensor Network (WSN). This paper proposes Group Search Optimization (GSO) algorithm with Neural Network (NN) for developing the novel query-based data aggregation model. The Querying Order (QO) model in the scheme uses Query Order that can be ranked on the basis of latency and throughput. The paper aims to build up the QO model with low latency and high throughput thereby enhancing existing data aggregation techniques. Thus it can assist the network administrator to get the knowledge regarding the best queries for enhancing the performance of the sink. Further, it compares the performance of conventional methods by analyzing the latency as well as throughput of the network. It reveals that the data aggregation performance of the proposed model outperforms the conventional models as it minimizes latency and maximizes throughput.