update query by level