DATA CLEANING WITH SQL

 Data Cleaning is one of the most important skills to have as a Data Analyst/Scientist. There are several tools used to clean up data one of which is SQL. SQL is one of the most widely used tools in Data Cleaning because of its convenience in working with a large amount of data. You could be working with a dataset with over 50,000 rows in SQL.

When it comes to Data Cleaning in SQL, there are different tools.

We will be looking at CAST()

Casting helps in changing a data field data type to a more convenient data type to aid our analysis.

CAST works in the format below:

CAST(input_data AS data-type)

In the data set shown in the video below, the data type of the date field( SaleDate) is Date-time instead of Date. we can change it to date by using the Query below:

SELECT
CAST(SaleDate AS Date) AS Date
FROM PROJ.dbo.Nash.



Comments

Popular posts from this blog

EXPLORATORY ANALYSIS OF COVID_19 CASES AND VACCINATION IN NIGERIA