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.
Deze oefening maakt deel uit van de cursus
Exploratory Data Analysis in SQL
Oefeninstructies
- Trim digits 0-9,
#,/,., and spaces from the beginning and end ofstreet. - Select distinct original
streetvalue and the correctedstreetvalue. - Order the results by the original
streetvalue.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
SELECT distinct street,
-- Trim off unwanted characters from street
trim(___, ___) AS cleaned_street
FROM evanston311
ORDER BY ___;