MulaiMulai sekarang secara gratis

Trimming

Some of the street values in evanston311 include house numbers with # or / in them. In addition, some street values end in a ..

Remove the house numbers, extra punctuation, and any spaces from the beginning and end of the street values as a first attempt at cleaning up the values.

Latihan ini adalah bagian dari kursus

Exploratory Data Analysis in SQL

Lihat Kursus

Petunjuk latihan

  • Trim digits 0-9, #, /, ., and spaces from the beginning and end of street.
  • Select distinct original street value and the corrected street value.
  • Order the results by the original street value.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

SELECT distinct street,
       -- Trim off unwanted characters from street
       trim(___, ___) AS cleaned_street
  FROM evanston311
 ORDER BY ___;
Edit dan Jalankan Kode