This is the classic bass riff to the Pink Floyd song "Money"
I hesitated to put this in the riffs for beginners tutorial because , although it's pretty easy to play , part of its brilliance lies in the fact that it has an odd time signature.
The time signature for any piece of music indicates the underlying pulse.
Most music has 4 beats per bar = 4/4 . This piece however has 7 beats per bar giving a time signature of 7/4.
As a beginner you don't want to worry about this at all just play and enjoy the riff - use first and third fingers throughout ( 1st finger gets all notes at fret 2 ; 3rd finger gets all notes at fret 4 )
The scale used is B pentatonic.