San Diego ranked fifth in the nation for the number of sales of million-dollar houses in the third quarter, according to a recent report from Redfin.

For the quarter, there were 293 residential sales in the county above $1 million, with the average sales price here just below $1.5 million, Redfin said.

Only San Francisco, Los Angeles, San Jose, and Chicago had more $1 million-plus sales. Nationally, these sales increased 9 percent from the same time last year.

Redfin said purchases from foreign investors have started to wane, and markets that are most dependent on international demand such as Los Angeles, Orange County, and Miami and Orlando in Florida are seeing a steady and dramatic decline in sales of $1 million-plus houses.

There’s also a drop-off in the number of all-cash buyers, Redfin said. About half of all the transactions in the seven markets with heavy international investor interest were in cash at the start of the year, but fell to 22 percent by the third quarter, according to the Seattle-based real estate brokerage and data provider.