Answer
The Violin Sonata in G Minor was written in the key of G minor. This means that the tonic note of the piece is G, and that the piece is based on the G minor scale. The G minor scale is a diatonic scale, meaning that it contains seven notes: G, A, B, C, D, E, and F#.