Generalizing the query