WEEK 3 : Using SQL to clean data Flashcards

1
Q

SUBSTR

A

To retrieve a part of a string
SUBSTR(column, position de la lettre de départ, nombre de lettre a extraire à partir de la lettre de départ)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

LENGTH

A

To count the length of a string
LENGTH(column) > 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TRIM

A

To remove spaces
TRIM(column) = ‘xx’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

CAST

A

Can be used to convert anything from one data type to another (typecasting)
CAST(column AS type)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly