We have conducted a 3-mm molecular-line survey towards 570 high-mass star-forming clumps, using the Mopra telescope. The sample is selected from the 10000 clumps identified by the ATLASGAL (APEX Telescope Large Area Survey of the Galaxy) survey and includes all of the most important embedded evolutionary stages associated with massive star formation, classified into five distinct categories (quiescent, protostellar, young stellar objects, HII regions, and photon-dominated regions). The observations were performed in broad-band mode with frequency coverage of 85.2-93.4GHz and a velocity resolution of ~0.9km/s, detecting emission from 26 different transitions. We find significant evolutionary trends in the detection rates, integrated line intensities, and abundances of many of the transitions and also identify a couple of molecules that appear to be invariant to changes in the dust temperature and evolutionary stage [N_2_H^+^ (1-0) and HN^13^C (1-0)]. We use the K-ladders for CH_3_C_2_H (5-4) and CH_3_CH (5-4) to calculate the rotation temperatures and find around one-third of the quiescent clumps have rotation temperatures that suggest the presence of an internal heating source. These sources may constitute a population of very young protostellar objects that are still dark at 70um and suggest that the fraction of truly quiescent clumps may only be a few per cent. We also identify a number of line ratios that show a strong correlation with the evolutionary stage of the embedded objects and discuss their utility as diagnostic probes of evolution.