Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Clean Up City Names | String Functions
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Functions in SQL

bookChallenge: Clean Up City Names

Tâche

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 TRIM function to remove any leading or trailing spaces from the city column.
  • 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 as cleaned_city.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 6
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits or drawbacks?

Can you give me a real-world example?

close

bookChallenge: Clean Up City Names

Glissez pour afficher le menu

Tâche

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 TRIM function to remove any leading or trailing spaces from the city column.
  • 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 as cleaned_city.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 6
single

single

some-alt