US labour market loses 23,000 jobs in July as education, government and retail sectors record significant declines.