When I ran your query I also received a table with errors. It seems like the export is missing info in certain cities, leading to records not having identical structure. Consequently, when exported it populates rows with wrong data as the schema doesn't match.
I quickly did a spatial join with a layer of country boundaries. Attached here. Hope this solves your problem.
If this answer solved your question or if you found it helpful please mark it accordingly to help others who have the same question.