MIS 2113 Exam 1 (SQL and ERD) Questions With
Correct Answers
What order does an SQL statement go in? - CORRECT ANSWER✔✔-1.
| | | | | | | | | | |
Select
2. From
|
3. Where
|
4. Group By
| |
5. Having
|
6. Order By
| |
SELECT statement - CORRECT ANSWER✔✔-always denoted by "show"
| | | | | | | |
and includes columns/attributes/names
| |
FROM statement - CORRECT ANSWER✔✔-includes the table/entity
| | | | | | |
name
WHERE statement - CORRECT ANSWER✔✔-Includes conditional
| | | | | |
expression/column name(s) |
ORDER BY statement - CORRECT ANSWER✔✔-includes column
| | | | | |
list/attribute
|
, example of alias - CORRECT ANSWER✔✔-SELECT CustomerFName as
| | | | | | |
'First Name'
| |
DISTINCT - CORRECT ANSWER✔✔-returns "unique" values, goes right
| | | | | | | |
after the word SELECT, the question will always say show the
| | | | | | | | | |
unique/distinct ...
| |
What operators can go in the where statement? - CORRECT
| | | | | | | | | |
ANSWER✔✔-=, <>, <, >, >=, <=, and, or, not, between, in, like, null
| | | | | | | | | | | |
Single Quotation Marks ('...') - CORRECT ANSWER✔✔-used for
| | | | | | |
string/text, not needed for numbers unless it is a date like '2/18/22'
| | | | | | | | | | | |
AND - CORRECT ANSWER✔✔-all conditions may be met (question asks
| | | | | | | | | |
for "red and black shoes")
| | | |
OR - CORRECT ANSWER✔✔-one condition must be met (question asks
| | | | | | | | | |
for "red or black sneakers"
| | | |
Paranthesis - CORRECT ANSWER✔✔-Used to split up a statement
| | | | | | | | |
e.g. WHERE (color = 'red' or color = 'black') and (category = 'sneakers')
| | | | | | | | | | | |
Correct Answers
What order does an SQL statement go in? - CORRECT ANSWER✔✔-1.
| | | | | | | | | | |
Select
2. From
|
3. Where
|
4. Group By
| |
5. Having
|
6. Order By
| |
SELECT statement - CORRECT ANSWER✔✔-always denoted by "show"
| | | | | | | |
and includes columns/attributes/names
| |
FROM statement - CORRECT ANSWER✔✔-includes the table/entity
| | | | | | |
name
WHERE statement - CORRECT ANSWER✔✔-Includes conditional
| | | | | |
expression/column name(s) |
ORDER BY statement - CORRECT ANSWER✔✔-includes column
| | | | | |
list/attribute
|
, example of alias - CORRECT ANSWER✔✔-SELECT CustomerFName as
| | | | | | |
'First Name'
| |
DISTINCT - CORRECT ANSWER✔✔-returns "unique" values, goes right
| | | | | | | |
after the word SELECT, the question will always say show the
| | | | | | | | | |
unique/distinct ...
| |
What operators can go in the where statement? - CORRECT
| | | | | | | | | |
ANSWER✔✔-=, <>, <, >, >=, <=, and, or, not, between, in, like, null
| | | | | | | | | | | |
Single Quotation Marks ('...') - CORRECT ANSWER✔✔-used for
| | | | | | |
string/text, not needed for numbers unless it is a date like '2/18/22'
| | | | | | | | | | | |
AND - CORRECT ANSWER✔✔-all conditions may be met (question asks
| | | | | | | | | |
for "red and black shoes")
| | | |
OR - CORRECT ANSWER✔✔-one condition must be met (question asks
| | | | | | | | | |
for "red or black sneakers"
| | | |
Paranthesis - CORRECT ANSWER✔✔-Used to split up a statement
| | | | | | | | |
e.g. WHERE (color = 'red' or color = 'black') and (category = 'sneakers')
| | | | | | | | | | | |