The formation of sdBs as well as the chemical composition of their atmospheres is still puzzling. While helium and other light elements are depleted relative to solar values, heavy elements are highly enriched. Diffusion processes in the hot, radiative atmosphere of these stars are the most likely explanation. Although several attempts have been made, it has not yet been possible to model all the observed features of sdB atmospheres. A drawback of most prior studies was the small sample size. We present a detailed abundance analysis of 139 sdBs. A general trend of enrichment was found with increasing temperature for most of the heavier elements. The lighter elements like carbon, oxygen and nitrogen are depleted and less affected by temperature. Although there is considerable scatter from one star to the other, the general abundance patterns in most sdBs are similar. An interplay between gravitational settling, radiative levitation and weak winds is most likely responsible. About 3% of the analysed stars show an enrichment in carbon and helium, which cannot be explained in the framework of diffusion alone. Nuclear processed material must have been transported to the surface somehow.