Water is a key constituent of star-forming matter, but the origin of its line emission and absorption is not well understood. In particular it is not clear whether its abundance in gas phase is governed by sputtering of icy mantles or by high-temperature chemistry. In this talk, I will review the main results of WISH (Water In Star-forming regions with Herschel), a Herschel-key program which investigated water properties over a broad range of luminosities and evolutionary stages in low-mass and high-mass YSOs. This analysis will be complemented by first results from a survey of water in 100 massive star-forming regions selected from the ATLASGAL continuum survey of the Galactic plane at 870 micron. These observations allow us to investigate the excitation, abundance, and chemistry of water in a statistical sample of sources representative of the proto-cluster Galactic population.