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 aandelen