I posted this in chat but it probably fits better here.
Say you have a child who is average in most subjects at school.
School 'a' is a really good school where most of the kids are above average so here...your child would probably be put in a lower, if not the lowest group.
School 'b' has quite a bad reputation because most of the kids come from 'severely disadvantaged' areas and 80% of them are below average. Here, your child would be in the top set for everything and would be chosen for the GCSE options that are only open to the higher attaining children. (such as IT Diploma).
What's the best scenario? bottom set at good school or top set at not so good school?
Bottom set at good school - on the grounds that the mass of children will tend to either pull one another up or drag them down. depending on the general environment. Plus a "really good school" should be able to help all children to reach their potential. If they can't, they're not a good school!
I would visit both schools and read the ofsted reports. Also which school is nearest and which school are most of your child's friends going to.
Also is your child likely to be sheep and follow the crowd or would they work hard in an enviroment where all the other children were lazy.
I would have thought a really good school would offer GCSE options according to what children are capable of. Ie.if there are a lot of high attaining children then run several classes to offer your IT diploma.