California had its second-largest quarter ever for sales of $1 million-plus homes, but in a reflection of the state’s divided housing market also had the lowest sales in nine years for more in-reach homes priced $500,000 or less, according to home sales data from CoreLogic.

The seven-figure-and-up home sales totaled 10,562 throughout the state in the first quarter of this year, topped only by 15,222 such sales in the second quarter of 2016.

Driving the sales are a rising stock market, job growth, and increased consumer confidence, said Andrew LePage, a research analyst for CoreLogic, in the analytical data company’s just-released online publication The MarketPulse.

At the same time, LePage noted, the number of homes priced below $500,000 was the lowest for any quarter in five years. “Home price appreciation and tight inventories in many markets have led to fewer sub $500,000 sales,” LePage wrote.

He said 59.3 percent of all homes sold January through March were priced below $500,000, the lowest for any quarter in nearly a decade, since the third quarter of 2007.

While the five top ZIP codes for sales of homes worth at least $1 million or more were about where Californians would guess — San Diego, including Carmel Valley; La Jolla, Irvine, Laguna Beach and San Jose — there are several Inland locations with currently listed homes in that price range.

A scan of Zillow.com Monday morning showed seven-figure-plus homes on the market in the San Bernardino Mountains communities of Lake Arrowhead, Big Bear City and Big Bear Lake, along with the exurbs of Rancho Cucamonga, Chino, and Chino Hills.

In Riverside County, desert cities including Rancho Mirage, Indian Wells, Palm Springs and La Quinta had high-end homes, along with listings from Temecula, Murrieta, Canyon Lake, Corona and Riverside.

Of the homes that sold for $1 million or above in the first quarter, 77 percent were priced between $1 million and $2 million, LePage said, and 78 percent were existing — that is, not new — homes.