Mg II absorption in the spectra of 103 QSOs : implications for the evolution of gas in high-redshift galaxies