Watch the Changing Bass online guitar lesson by Joe Dalton from Fretboard Epiphanies
The first chord in this example is a Gmaj7. The second is an Em9. The D note is the 7th. (count from E up to D) The F# is the 9th. (Count up again. Chords are built in thirds, so we skip a note every time. Root-third-fifth-seventh-ninth) The third chord could be a Gmaj7/B. (A Gmaj7 with a B in the bass, or first inversion) It sounds more like a Bm chord here. With the open 3rd string, it would be a Bm6. The next chord is a C9#11. Sometimes it's better to know that the chord sounds good and works for a particular piece.