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

bookChallenge: Clean Up City Names

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 6
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

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

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 6
single

single

some-alt