  We propose a fresh look at the Main Galaxy Sample of the Sloan Digital Sky
Survey by packing the galaxies in stellar mass and redshift bins. We show how
important it is to consider the emission-line equivalent widths, in addition to
the commonly used emission-line ratios, to properly identify retired galaxies
(i.e. galaxies that have stopped forming stars and are ionized by their old
stellar populations) and not mistake them for galaxies with low-level nuclear
activity. We find that the proportion of star-forming galaxies decreases with
decreasing redshift in each mass bin, while that of retired galaxies increases.
Galaxies with $M_\star > 10^{11.5} M_\odot$ have formed all their stars at
redshift larger than 0.4. The population of AGN hosts is never dominant for
galaxy masses larger than $10^{10} M_\odot$. We warn about the effects of
stacking galaxy spectra to discuss galaxy properties. We estimate the lifetimes
of active galactic nuclei (AGN) relying entirely on demographic arguments ---
i.e. without any assumption on the AGN radiative properties. We find
upper-limit lifetimes of about 1--5 Gyr for detectable AGN in galaxies with
masses between $10^{10}$--$10^{12} M_\odot$. The lifetimes of the AGN-dominated
phases are a few $10^8$ yr. Finally, we compare the star-formation histories of
star-forming, AGN and retired galaxies as obtained by the spectral synthesis
code STARLIGHT. Once the AGN is turned on it inhibits star formation for the
next $\sim$ 0.1 Gyr in galaxies with masses around $10^{10} M_\odot$, $\sim$ 1
Gyr in galaxies with masses around $10^{11} M_\odot$.
