课程: Coding Exercises: SQL Data Science
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Text formatting and pattern matching
- [Instructor] Haley Klark is a fellow analyst and she was trying to extract regional data from the database, but she has run into some errors because of raw data. She has reached out to you to help her get formatted data for the region, Latin America and Caribbean. She wants to get rid of the period and replace the ampersand symbol with 'and'. Now, this is a data cleaning task and the challenge is to format regional names, to remove period and replace ampersand with the 'and' for the region, Latin A M E R period space, and, then you have CARIB, so Latin America and Caribbean. And you also have to trim out any trailing spaces. Now, some of the crucial parts of this query are going to be, you have to use CountryRegions table, first of all. Then you can use replace function to replace all the periods and ampersand symbols from the string. You can use trim function to remove all the trailing spaces in the string. And lastly,…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。