The second-quarter U.S. Home Sales Report from ATTOM Data Solutions offered several interesting insights into the local and national housing markets. Here are a few of them:

Average price gains

Homeowners in the Twin Cities metro who sold during the second quarter realized an average price gain of $47,000 since purchase. That is compared with a U.S. average price gain of $51,000 — the highest average price gain for home sellers since the second quarter of 2007, when it was $57,000.

For the average home seller in the Twin Cities, that amounted to an average return of 24.4 percent, slightly less than a national return of 26 percent. The national figure was the highest since the third quarter of 2007, when it was 27 percent.

Homeowner tenure

Homeowners are staying in their houses longer. Sellers during the second quarter owned their home for an average 8.05 years, up from 7.59 years during the same quarter last year. That was the longest average homeownership tenure at least as far back as the beginning of 2000, the earliest date the data is available.

Cash sales

The share of all sales that were cash posted the first annual increase since the first quarter of 2013. During the second quarter, all-cash sales represented 28.9 percent of all single-family and condo sales, up from 27.3 percent during the same quarter last year when the share of cash sales increased for the first time since the beginning of 2013.

In the Twin Cities, 19 percent of all sales were cash, 10 percent more than last year at the same time.

Sales to institutional investors

In the Twin Cities, 1.7 percent of all single-family homes and condo sales were to institutional investors, defined as entities that bought at least 10 properties in a calendar year, down 37 percent compared with last year. Nationwide, investor sales represented 2.1 percent of all closings during the quarter. That is compared with 2.6 percent last year. However, 19 of the 73 metro areas tracked by the report saw a slight bump in investor purchases.

The upshot

Daren Blomquist, senior vice president at ATTOM Data Solutions, said the report shows that would-be home sellers in today’s market are caught in a Catch-22.

“While it’s the most profitable time to sell in a decade, it’s also extremely difficult to find another home to purchase, which is helping to keep homeowners in their homes longer before selling,” he said in a statement. “And the market is becoming even more competitive.”