Complex sentence: It was formed on October 1,2005 by the merger of the old city of Hirara, the towns of Gusukube, Irabu and Shimoji, and the village of Ueno, all from Miyako District, which as a result of the merger has one remaining village.
Split into simpler sentences: It was formed on October 1 2005, when the city of Hirara, the towns of Irabu, Gusukube, and Shimoji, and the village of Ueno merged. The towns and the village were in Miyako District, which as a result of the merger has one remaining village.