Corey O’Connor has won the hotly contested Democratic primary for mayor. Incumbent Pittsburgh Mayor Ed Gainey was challenged by Allegheny County Controller Corey O’Connor.