The starting pitcher.
A pitcher who doesn't get an out in the 1st inning and who is pulled from the game is still considering the starting pitcher. He will be listed this way on the team spreadsheet and roster.
The pitcher who got the last out in the previous bottom of that inning. In other word, that pitcher can be credited with the win by making only one pitch. If I'm called in as a reliever and get a ground out to end the inning and then my team goes ahead in the top of the next inning, I would be the winning pitcher. Even if i only threw one pitch.
The win goes to the relief pitcher (assuming there was more than one relief pitcher) whom the official scorer feels was most instrumental in the victory. That relief pitcher must pitch at least 1 full inning, or pitch a crucial out if he pitches less than one inning.
cliff lee
Second to Third to First to Pitcher
In Major League Baseball there is no limit per game, but on the second visit in an inning, the pitcher must be replaced. Therefore, in a 9-inning game, a manager could visit the starting pitcher 9 times.
With no addtional information available, the winning pitcher is the relief pitcher who came in in the 4th inning. Remember, a starting pitcher must pitch five complete innings before he can be credited with a win.
Pitch count has nothing to do with eligibility to be the winning pitcher. In a scheduled 9-inning game, the starting pitcher must pitch 5 complete innings to be eligible to be the winning pitcher. Relief pitchers must be the pitcher of record when the winning team takes the lead, and never relinquishes the lead, to be the winning pitcher.
Unlike the starting pitcher, a relief pitcher has no minimum number of innings pitched. Given the definition of a win, however, it's impossible for a pitcher to achieve it without pitching at least 0.1 inning (one out).
If a pitcher leaves a tie game after finishing the 8th inning he cannot get the loss. If his team takes the lead before another pitcher on his team throws a pitch he could be credited with the win. For example, if a pitcher finishes the bottom of the 8th with a tie score and his team takes the lead in the top of the 9th and they keep the lead in the bottom of the ninth, he gets the win. If his replacement throws a pitch in the bottom of the 9th with the score still tied, the pitcher that left after the 8th inning gets a "no decision". If his team takes the lead in the top of the ninth, but they cannot hold the lead in the bottom of the ninth (another tie or loss) the pitcher that finished the 8th inning gets a "no decision". The final win will go to the "pitcher of record" when the winning run is finally scored (even if he only faced the last batter of the inning before the winning run is scored). The pitcher that gives up the winning run gets the loss.
The situation that you describe is not possible because a pitcher who is starting at home would pitch the top of the inning, not the bottom. The home team always plays defense in the top of an inning and offense in the bottom of an inning. If the score is 0-0 in the top of the seventh and the team scores in the top of the seventh and does not give up the lead, the pitcher who was in the lineup in the bottom of the sixth when the final out was recorded will be awarded the win regardless of whether they pitch the bottom of the seventh.
Yes, the pitcher and any other player may move to any position on the field and back to his original position, or any other position at any time during the game.