I'm working with a pretty large database of cities. I have several rows of cities that are repeated because they are from different countries / states.
What I need to do is:
The cities that are repeated, concatenate in this way
(ascii_name + "_"+ country_code)
in column: name_city
Only the cities that are repeated.
with this filter code those that are repeated:
SELECT ascii_name FROM cities GROUP BY ascii_name HAVING count (ascii_name)> 1
For example(img) with "Rome" I get 3 rows and I want to differentiate them in that column "name_city" with "country_code"
(It's mysql)