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.
Lösung
Danke für Ihr Feedback!
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Großartig!
Completion Rate verbessert auf 2.86
Challenge: Clean Up City Names
Swipe um das Menü anzuzeigen
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.
Lösung
Danke für Ihr Feedback!
single