The past tense of have the upper hand is had the upper hand.
The third-person singular simple present indicative form of have the upper hand is has the upper hand.
The present participle of have the upper hand is having the upper hand.
The past participle of have the upper hand is had the upper hand.