With the developments of related techniques in telecommunication and computer sciences, wireless sensor networks have been used more and more widely. While sensor nodes in wireless sensor networks have very limited memory spaces and power. In this paper, we propose a new method to preprocess the query predicates. The size of the relational table can be further reduced using the aggregated query predicates. The reduced relational table can be stored on the sensor nodes. This may cause false positive but definitely no false negative. When the required data are sent back to the sink, we can do join operation between the real query predicate and the relational table again, and eliminate the redundant data.