Query(Query query) constructor