https://www.linkedin.com/posts/data-dawn_your-analyses-is-useless-if-your-data-is-activity-7375890512094040064-p0Ud?utm_source=social_share_video_v2&utm_medium=android_app&rcm=ACoAAAMyhrcBZfCbyRqksrH2wYOCdYxljJ2vRuI&utm_campaign=copy_link
https://www.linkedin.com/posts/data-dawn_your-analyses-is-useless-if-your-data-is-activity-7375890512094040064-p0Ud?utm_source=social_share_video_v2&utm_medium=android_app&rcm=ACoAAAMyhrcBZfCbyRqksrH2wYOCdYxljJ2vRuI&utm_campaign=copy_link
WWW.LINKEDIN.COM
Your analyses is useless. If your data is a mess. 8 steps to clean data in SQL ๐Ÿ‘‡ ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿฌ: ๐—จ๐—ป๐—ฑ๐—ฒ๐—ฟ๐˜€๐˜๐—ฎ๐—ป๐—ฑ ๐—ฑ๐—ฎ๐˜๐—ฎ ๐˜€๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ โ†ณ Understand column names and types โ†ณ Check out a… | Dawn Choo | 64 comments
Your analyses is useless. If your data is a mess. 8 steps to clean data in SQL ๐Ÿ‘‡ ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿฌ: ๐—จ๐—ป๐—ฑ๐—ฒ๐—ฟ๐˜€๐˜๐—ฎ๐—ป๐—ฑ ๐—ฑ๐—ฎ๐˜๐—ฎ ๐˜€๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ โ†ณ Understand column names and types โ†ณ Check out a sample of the data ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿญ: ๐—˜๐˜…๐—ฝ๐—น๐—ผ๐—ฟ๐—ฒ ๐˜๐—ต๐—ฒ ๐—ฑ๐—ฎ๐˜๐—ฎ โ†ณ For numerical columns, check distributions โ†ณ For categorical variables, check frequencies ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿฎ: ๐—ฆ๐˜๐—ฎ๐—ป๐—ฑ๐—ฎ๐—ฟ๐—ฑ๐—ถ๐˜‡๐—ฒ ๐—ฑ๐—ฎ๐˜๐—ฎ ๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜๐˜€ โ†ณ Convert strings to lower case or upper case โ†ณ Cast dates to readable format โ†ณ Remove white spaces ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿฏ: ๐—ฅ๐—ฒ๐—บ๐—ผ๐˜ƒ๐—ฒ ๐—ฑ๐˜‚๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€ โ†ณ Use DISTINCT to remove duplicate rows ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿฐ: ๐—™๐—ถ๐—น๐—น ๐—ถ๐—ป ๐—ป๐˜‚๐—น๐—น๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—บ๐—ถ๐˜€๐˜€๐—ถ๐—ป๐—ด ๐˜ƒ๐—ฎ๐—น๐˜‚๐—ฒ๐˜€ โ†ณ Fill with 0 (only when 0 is a meaningful default) โ†ณ Drop the data, if missing data makes the row unusable โ†ณ Fill with the average (for numerical data only) ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿฑ:  ๐—ฆ๐˜๐—ฎ๐—ป๐—ฑ๐—ฎ๐—ฟ๐—ฑ๐—ถ๐˜‡๐—ฒ ๐—ฐ๐—ฎ๐˜๐—ฒ๐—ด๐—ผ๐—ฟ๐—ถ๐—ฐ๐—ฎ๐—น ๐˜ƒ๐—ฎ๐—ฟ๐—ถ๐—ฎ๐—ฏ๐—น๐—ฒ๐˜€ โ†ณ Use CASE WHEN to clean the data ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿฒ: ๐—™๐—ถ๐—น๐˜๐—ฒ๐—ฟ ๐—ผ๐˜‚๐˜ ๐—ฏ๐—ฎ๐—ฑ ๐—ฑ๐—ฎ๐˜๐—ฎ โ†ณ Use WHERE to filter out unusable rows ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿณ: ๐—ฅ๐—ฒ๐—ป๐—ฎ๐—บ๐—ฒ ๐—ฐ๐—ผ๐—น๐˜‚๐—บ๐—ป๐˜€ ๐—ณ๐—ผ๐—ฟ ๐—ฐ๐—น๐—ฎ๐—ฟ๐—ถ๐˜๐˜† โ†ณ Use intuitive and clear column names ๐—ฆ๐˜๐—ฒ๐—ฝ ๐Ÿด: ๐—–๐—ฟ๐—ฒ๐—ฎ๐˜๐—ฒ ๐—ฟ๐—ฒ๐˜‚๐˜€๐—ฎ๐—ฏ๐—น๐—ฒ ๐˜ƒ๐—ถ๐—ฒ๐˜„๐˜€ ๐—ผ๐—ฟ ๐˜๐—ฎ๐—ฏ๐—น๐—ฒ๐˜€ โ†ณ Create a view (doesn't take up more storage) โ†ณ Save as a table (faster for querying) ——— Ready to test your SQL skills? Check out these questions on Interview Master: ๐Ÿ™‚ Easy SQL question: https://lnkd.in/gG_A8FWP ๐Ÿ˜‰ Medium SQL question: https://lnkd.in/geQqR_uV ๐Ÿ˜„ Hard SQL question: https://lnkd.in/gRrNfcuK ——— โ™ป๏ธ Found this useful? Repost it please! | 64 comments on LinkedIn
0 Commenti 0 condivisioni