Official figures show the economy contracted even before the full impact of the virus pandemic.