The customers table was filled by hand and the same city appears as Manila, manila and MANILA.
Return every distinct city name written in lower case, sorted alphabetically.
Hint 1
Apply the function to the column: LOWER(city).
Hint 2
DISTINCT works on the result of the expression, so apply LOWER first.
Reference solution
SELECT DISTINCT LOWER(city) AS city
FROM customers
ORDER BY city;
DISTINCT compares the values it receives. If you hand it Manila and manila it treats them as different. Wrapping the column in LOWER()inside the SELECT DISTINCT normalises the text first, so equal cities collapse into one. Cleaning text before comparing or grouping is one of the most common jobs in real data work.