Query processing can be briefly defined as a database that comprises of an organized collection of data for one or more users either in digital form or in analog form such that it can portray exactly. A Wireless Sensor Network (WSN) is a specialized network of minimum cost and power sensor nodes that can be described as the ability of performing some processing, gathering sensory information and communicating with each other. Query ordering with data aggregation is the process of scheduling of the nodes to receive the useful data from sensors. Data aggregation is considered as one of the fundamental processing procedures for saving the energy. In WSN data aggregation is an effective way to save the limited resources. This paper proposes a novel query-based data aggregation model with the aid of intelligent techniques. The framing of the query order takes place and the frames are ranked on the basis of a multi-objective function. The newly developed multi-objective function includes Latency, Throughput and Data freshness. Initially, the solution corresponding to query order is trained in NN using the proposed Fitness-Mated Lion Algorithm (FM-LA). The optimally generated query order from NN is further given for second-level solution generation, which is again applied to FM-LA for subsequent query order optimization. Hence the two-stage optimization process with NN for query ordering is compared over the conventional methods in terms of performance measures like Latency, throughput and data freshness. Hence, substantiated performance and comparative analysis validate the improved performance of the proposed model.