quiz
Quiz
Top of Form
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 |
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 |
Which clause gets applied first when a query is processed: WHERE or HAVING?
Question 3 options:
|
|
WHERE |
|
|
HAVING |
|
|
Neither - they're processed simultaneously |
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 |
Queries are limited to a single Common Table Expression definition
Question 5 options:
|
|
True |
|
|
False |
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 |
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 |
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 |
Which ranking function allows you to specify an ORDER BY clause?
Question 9 options:
|
|
ROW_NUMBER() |
|
|
RANK() |
|
|
DENSE_RANK() |
|
|
NTILE() |
|
|
All of the above |
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