Oil and gas producer Apache Corp reported a much smaller quarterly loss compared with a year earlier, when the company took a near…