The G major chord is constructed from the G major scale. Using the major chord formula on the G major scale below, it can be seen that the G chord contains the notes G, B and D.
The fingering for the G chord is the same as the C chord: fingers 1, 3 and 5 of the right hand. Example 9 alternates between these two chords.