The star field age–metallicity relationship of the Small Magellanic Cloud