City of York Council has spent more than £3.5 million on repairing potholes in the last three years, new figures show.