Yes an error counts as an at bat, but not a hit. You would be 0 for 1 on the play, but your on base percentage goes up because you have reached base safely. Errors can be committed on sacrifice bunts and sacrifice flies. If the official scorer rules a play a sacrifice bunt/fly and an error, the batter is not charged with a time at bat. On base percentage goes down when reaching base on an straight error.
yes
no
Yes it does count
No, a sacrifice fly does not count as an official at-bat, in order to have an at-bat scored as a sac fly though a runner must advance home safely on your fly ball
Yes
No, walks do not count as an at-bat.
Anytime a batter is walked it does not count as an at bat
Any type of sacrifice, walk, or hit by pitch does not count as an at bat.
The official formula for on-base percentage is (Hits + Walks + Hit by pitch) / (At-bats + Walks + Hit by pitch + sacrifice flies). Reaching base on an error goes against your BA and OBP, as it doesn't count as a hit but counts as an at bat.
Yes
Yes, only things that don't count as at bats are walks, hbp or if a baserunner gets thrown out before your at bat is completed.
A fly ball that advances a runner from second to third is not counted as a sacrifice fly, and it does count as an at bat. Unless a runner scores on a fly ball, the batter is charged with an at bat.