SQL Flashcards

1
Q

Cannot use Having without:

A

Group by, because its a group level filtering criteria.

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

What are the BIG 6 ELEMENTS of a sql query?

A

1) SELECT: identifies the columns.
2) FROM: identifies the table
3) WHERE: filter your results
4) GROUP BY: how to group the data.
5) HAVING: group filtering criteria
6) ORDER BY: order of the displayed results.

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

Which two components of a query are absolutly essential?

A

Select and from.

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

What is the USE statement?

A

You tell the query which database it should query. You can avoid having to use the USE statement if you set the default database to the one you are using.

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