By Connor Hart

General Motors reported lower second-quarter sales, dragged down by a smaller electric-vehicle market, discontinued vehicles and some inventory constraints.

The company sold 714,896 vehicles during the recent quarter, down 4.2% from a year earlier.

Despite the decrease, North American President Duncan Aldred said Wednesday that General Motors led the market in sales.

"Our business is performing well, and customer demand is resilient, especially for our trucks and SUVs," he said, adding the company's discipline on inventory, pricing and incentives helped it deliver strong margins.

General Motors said its average transaction price of more than $52,400 during the recent quarter reflected its strength in trucks, SUVs and the luxury market. The company added that it continued to offer six budget-friendly Chevrolet and Buick models, with starting manufacturer's suggested retail prices of about $30,000 or less.

Write to Connor Hart at connor.hart@wsj.com