FILTERING DATA Flashcards

1
Q

WHERE

A

Keyword for condition used for filtering.

SELECT column
FROM data
WHERE column = 1;

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

=

A

Used when 2 values are equal or to pick a specific value

SELECT column
FROM data
WHERE column = 1;

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

‘ ‘

A

Quotes are used when writhing a text value

SELECT colour
FROM data
WHERE colour = ‘black’;

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

<>

A

Selects data that doesn’t satisfy a condition or not equal to

SELECT colour
FROM data
WHERE colour <> ‘black’;

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

<

A

Less that operator

SELECT number
FROM data
WHERE number < 5;

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

>

A

Greater that operator

SELECT number
FROM data
WHERE number > 5;

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

<=

A

Less that or equal to

SELECT number
FROM data
WHERE number <= 5;

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

>=

A

Greater that or equal to

SELECT number
FROM data
WHERE number >= 5;

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

BETWEEN

A

Keyword to check property within range.

SELECT *
FROM movies
WHERE rating BETWEEN 9 AND 10;

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

AND

A

Keyword used to define a range.

SELECT *
FROM movies
WHERE rating BETWEEN 9 AND 10;

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

LIKE

A

Keyword to filter out by pattern within text values

SELECT*
FROM movies
WHERE action LIKE ‘a%’ ;

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

%

A

It helps you define what latter/words starts, end and words in between a sentence or letter. If left on it own it gives all the data in a selected column

SELECT*
FROM movies
WHERE action LIKE ’a%’;

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