have the upper hand vs have the whip hand

have the upper hand

have the whip hand

How often have the words have the upper hand and have the whip hand occurred in a corpus of books? (source: Google Ngram Viewer )