De La Rosa pitched 3⅔ innings, allowing six runs (five earned) on seven hits, walking one and striking out one. He threw 70 pitches, 44 of them for strikes.
He had an RBI single in the fourth inning, which tied the game at two, but the Giants put six runs on the board in the bottom half of the inning – including Sandoval's three-run homer – to put the game out of reach.
Barry Zito pitched 5⅔ innings, giving up two earned runs and surrendering 10 hits in the win.
The Giants lead the NL West by 9½ games.