SAN FRANCISCO -- Ozzie Guillen sure could use a lopsided game to bring his blood pressure down.
At least his Miami Marlins left San Francisco with a nice winning streak only a few days after being booed in their home ballpark.
Hanley Ramirez drove in a pair of runs without a hit to back Anibal Sanchez's first win in four starts, and the Marlins rebounded from a rough stretch for a 3-2 victory over the Giants on Thursday and a three-game sweep.
"A win is a win, especially the way that we have been playing," Guillen said. "We'll take every win. We've got to get better. It's very hard for our pitching staff to go out there and shut people down every day. At least we got people on base. It's more fun that way. I'd rather have people on base than nobody on base. We cannot get the big hit to open a game. Every time we have people on base something happens to shut down and we don't have the big hit to rally. It's getting old."
Giancarlo Stanton doubled in the seventh after he homered in three of his previous four games. Stanton has nine doubles and four home runs in 10 career games in the Giants' waterfront ballpark.
A 3,000-mile trek cross-country and a change of scenery seems to have done the trick for the rebounding Marlins, who had lost eight of nine and were booed in their new home stadium before starting this series -- the club's second three-game sweep at AT&T Park in as many visits.
"To come here and win all three games was great for us," shortstop Jose Reyes said. "We're playing good as a team now. We're playing very good defense. A couple weeks ago we didn't play too good of defense. We just need to learn from the three wins we had here and continue to play together as a team. If we're able to do that, we're going to compete in our division."
Edward Mujica worked the ninth for his first save in two chances on a day closer Heath Bell wasn't available after pitching in three straight games. The Marlins won their seventh in a row in San Francisco, taking all three in this series by one run, including 3-2 in 10 innings Wednesday night.
Sanchez (2-0) allowed one run on seven hits, struck out five and walked one in seven innings. He snapped a three-start stretch in which he didn't earn a decision, including a career-best 14-strikeout performance last Saturday's 3-2 home win against Arizona.
"There are a lot of opportunities and we're not taking advantage," Guillen said. "If we continue like that, the pitching staff is going to break down sooner or later."
Melky Cabrera had two hits and the Giants scored their only run on his double-play grounder in the sixth.
The Giants received tough news before the game when slugger and top hitter Pablo Sandoval was lost to a broken bone in his left hand that will require surgery Friday. He's expected to miss 4 to 6 weeks.
"Today it wasn't Pablo. We made some mistakes," manager Bruce Bochy said. "We're hurting ourselves more than anything. We can't get a productive out."
San Francisco has scored three or fewer runs in eight of its 12 home games and has not scored more than five runs in any of its games at AT&T Park.
Giants starter Ryan Vogelsong (0-2) was tagged for eight hits in seven innings, struck out five and walked four while throwing 116 pitches.
The Giants had runners on second and third in the seventh but couldn't convert, and they are 9 for 48 (.188) with runners in scoring position over the past six games. San Francisco went 0 for 5 Thursday.
"Everybody has to chip in and play harder. It's going to be harder to win every game," Brandon Belt said.
Conor Gillaspie, promoted from Triple-A Fresno to replace Sandoval, went 1 for 3 batting second as Angel Pagan dropped from leadoff to the No. 5 hole as the Giants dealt with the big blow of losing their All-Star slugger.
Pagan extended his career-best hitting streak to 17 games with a leadoff single in the seventh.
Reyes and Emilio Bonifacio pulled off a double steal in the eighth. ... The struggling Bell is still the Marlins' closer, according to Guillen -- for now, anyway. ... The Giants have 28 errors, second in the majors to San Diego's 29. ... Pagan batted fifth for the first time this season. He also hit sixth once but otherwise had been in the leadoff of No. 2 hole the rest of the time. ... All four of Vogelsong's starts have been afternoon games. ... Bochy was to be honored Thursday night by the American Leadership Forum in nearby Mountain View.
Everything you need to know about MLB's looming lockout
Will baseball's labor strife halt the hot stove and possibly even delay the 2022 season? We've got answers to all your questions ahead of tonight's deadline.
MLB free-agency tracker: Latest moves, grades and analysis
Need to keep tabs on all the major signings? Want to know how our experts grade the big deals? We've got you covered.
James Paxton, Boston Red Sox agree to 1-year, $10 million deal, sources say
Left-hander James Paxton and the Red Sox are in agreement on a one-year, $10 million contract with a two-year club option, sources said.
Raisel Iglesias, Los Angeles Angels agree to four-year deal, source says
Closer Raisel Iglesias and the Angels have agreed to a four-year contract, a source told ESPN's Jeff Passan.
Major League Baseball, players union no closer to deal with collective bargaining agreement set to expire, sources say
Major League Baseball and the players union are no closer to a new collective bargaining agreement with the expiration of the current one looming, sources said.
Baltimore Orioles reach 1-year deal with veteran 2B Rougned Odor
The Baltimore Orioles have agreed to a one-year deal with second baseman Rougned Odor.