I´ve only been playing guitar for 9 monthes, but i´ve played piano for 7 years. And the key for a song depends on the inventoey of keys in the entire song.
Exe: a song goes through the following chords... Ab, C, Eb, and Bb. This song must be in the key of A flat.
So do you want to know the key of the song, or of a part of the song?