Question: What city in Latvia was ceded by the treaty that ended the Second Northern War?
Sentence (from "Swedish Livonia"): The territory, which constituted the southern part of modern Estonia (including the island of Ösel ceded by Denmark after the Treaty of Brömsebro) and the northern part of modern Latvia (the Vidzeme region), represented the conquest of the major part of the Polish-Lithuanian Duchy of Livonia during the 1600–1629 Polish-Swedish War.
Relevant evidence: No