Week 2 Flashcards

(11 cards)

1
Q

What is select used for?

A

to select a subset of data from a table

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

What is a projection?

A

used to select a subset of columns from a table

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

What does ordering and distinct mean?

A

used to order the results and remove duplicates

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

What do joins do?

A

they combine data from multiple tables to retrieve desired information

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

What are the three different types of joins in sql?

A

inner, self, and outer

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

What does the join command return?

A

rows that have matching values in both tables

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

What does ‘as’ represent in sql?

A

we are giving something an alias

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

What does an outer join return?

A

rows that match the condition and exist in both tables

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

What does the left join return?

A

everything from table 1 and that is matching between table 1 and table 2

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

What does a right join return?

A

everything from table 2 and that is matching between table 1 and table 2

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

What does a full outer join return?

A

everything in both tables; table 1 rows, table 2 rows, matching from both

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