\begin{table}%t7 %\centering \par \caption{\label{tab:mz}Evolution of the mass-metallicity relation for the wide and deep samples. The reference relation is the one obtained by \citet{Tremonti:2004astro.ph..5537T} with SDSS data and the CL01 method, renormalized in mass. In each redshift range, we give the mean redshift, stellar mass, and metallicity shift (assuming that the shape of the relation remains constant, see Fig.~\ref{fig:mz}), and the dispersion of the relation. The metallicity shift is given in three cases: {\it a)} using only star-forming galaxies, {\it b)} adding candidate star-forming galaxies; and {\it c)} adding also candidate AGNs.} \small \begin{tabular}{lrrrrrr} \hline \hline\noalign{\smallskip} Sample & $z$ & $\lg(M_{\star})$ & \multicolumn{3}{r}{$\Delta\log({\rm O/H})^{M}$} & rms\\ & & & \emph{a} & \emph{b} & \emph{c} & \\ \hline \emph{wide} & & & & & & \\ $0.0