have mastery over vs have the upper hand over

have mastery over

have the upper hand over

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