Chemical evolution of galaxies, measured by gas-phase metallicities, is governed by and connects key galaxy-building processes: accretion of gas, star formation, and outflows. Recently, it has been proposed that an important tool to study these processes, the mass-metallicity relation, can be expanded to include the star formation rate, and that such three-way relation is fundamental, i.e., the same at every redshift. The fundamental relation would naturally explain the observed evolution of mass-metallicity relation and would place interesting constraints on galaxy evolution models. However, the exact character and even the reality of a three-way relation have been debated, as well as its non-evolving, fundamental aspect. I will present an analysis of this relation using extensive multiwavelength datasets, both in the local universe and at z~2, and discuss a number of insights regarding the evolution of ISM and SF that these efforts have produced.