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

bookChallenge: Clean Up City Names

Compito

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.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 6
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

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

Scorri per mostrare il menu

Compito

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.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 6
single

single

some-alt