Watch the Blues Forever: Melody online guitar lesson by John Goldsby from Upright Bass Handbook
Here we'll play the "Blues Forever" melody two times through the 12-bar chorus. Make sure that you know where the shifts occur. In the second chorus of this video, I'll call out where to shift. All of the notes in the melody are in either half or first position, and it's important to move your left hand at the exact moment when you need to grab a note.
Note that a lot of this melody uses a Bb blues scale, here from high to low: Bb, Ab, F, E, Eb, Db, Bb. In bar 3, the melody lands on the open D string. In bar 8, the melody lands on an open G. In bars 9-10, there is a nice ii-V7 lick over the Cmin7 to F7 chords.
Also note that I often slide into the note Db to add some inflection and blues sound to the melody. It's important to play all notes with good intonation, but the upright bass lends itself to sliding and left-hand inflections when the music calls for some extra "stank"!