Why does the database contain duplicate cities?

You may notice that there can be many places with the exact same name in the same admin area of any country.  Customers often assume that these are "duplicates" or multiple copies of the same place.  However, you'll notice that the lat/lng for each place is unique.  These are not "duplicates" but different places that happen to share the same name.  This seems strange, but is quite common.  For example, in the US there are 22 townships in the state of Pennsylvania with the name of "Washington".

Name conflicts can be even more common for countries with lots of places, large admin regions, and names that are translated from their original language into a Romanized form.  Because our databases include all populated places, including many tiny villages and towns, there are lots of opportunities for names to conflict.

If you want the most important place with a unique name in each admin, you should drop all places with same_name = 'TRUE' as described in the Fields section: