Update statistics query using only one query.