Clustering of galaxies: evolution, segregation and baryon acoustic oscillations