quiz

profilehome
quiz.docx

Quiz

Top of Form

Question 1 (2 points)

 

Multiple conditions (connected by logical AND or OR) can only be used in the WHERE clause; they can never be used in the HAVING clause.

Question 1 options:

True

False

Question 2 (2 points)

 

A logical condition comparing against an aggregate function (e.g. COUNT) can be used in:

Question 2 options:

Either the WHERE clause or the HAVING clause

Only the HAVING clause

Only the WHERE clause

Neither the WHERE clause nor the HAVING clause

Question 3 (2 points)

 

Which clause gets applied first when a query is processed: WHERE or HAVING?

Question 3 options:

WHERE

HAVING

Neither - they're processed simultaneously

Question 4 (2 points)

 

Saved

Common Table Expressions (aka CTE's) are defined:

Question 4 options:

In the FROM clause

In the WHERE clause

At the beginning of the query

At the end of the query

Question 5 (2 points)

 

Queries are limited to a single Common Table Expression definition

Question 5 options:

True

False

Question 6 (2 points)

 

Why is it necessary to apply distinct names for the columns defined in a Common Table Expression?

Question 6 options:

So that other statements can reference them unambiguously

It is not actually necessary

To prevent duplicate values in the results

To follow style guidelines

Question 7 (2 points)

 

What functionality is provided by both the COALESCE and ISNULL functions?

Question 7 options:

They both allow substitution for a NULL value

They both allow processing of multiple input values

They are both unique to Microsoft SQL Server

They can both return a chain of output values

Question 8 (2 points)

 

The following will execute in SQL Server, but is an incorrect usage.  Why?

SELECT COALESCE( NULL, GETDATE(), 123,  'ABC' );

Question 8 options:

All expressions in the list should have the same data type

There are too many inputs in the list

There is no FROM clause in the query

NULL values cannot be passed into COALESCE

Question 9 (2 points)

 

Which ranking function allows you to specify an ORDER BY clause?

Question 9 options:

ROW_NUMBER()

RANK()

DENSE_RANK()

NTILE()

All of the above

Question 10 (2 points)

 

What is the functional difference between RANK() and DENSE_RANK()?

Question 10 options:

Their return values are in reverse order

They function identically

RANK() can return NULL values

In the case of tie values, DENSE_RANK() will not skip rankings

Submit Quiz1 of 10 questions saved

Bottom of Form