Challenge: Clean Up City Names
Swipe to start coding
Practice using string functions to clean up city names in the customers table. Your goal is to remove any leading or trailing spaces from each city name and ensure the first letter is uppercase while the remaining letters are lowercase.
- Use the
TRIMfunction to remove any leading or trailing spaces from thecitycolumn. - Use string functions to capitalize only the first letter of the city name.
- Convert the rest of the city name to lowercase.
- Return the columns
id,name,email, and the cleaned-up city name ascleaned_city.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Чудово!
Completion показник покращився до 2.86
Challenge: Clean Up City Names
Свайпніть щоб показати меню
Swipe to start coding
Practice using string functions to clean up city names in the customers table. Your goal is to remove any leading or trailing spaces from each city name and ensure the first letter is uppercase while the remaining letters are lowercase.
- Use the
TRIMfunction to remove any leading or trailing spaces from thecitycolumn. - Use string functions to capitalize only the first letter of the city name.
- Convert the rest of the city name to lowercase.
- Return the columns
id,name,email, and the cleaned-up city name ascleaned_city.
Рішення
Дякуємо за ваш відгук!
single