Sail E0 Webinar

MCQs

Total Questions : 18 | Page 2 of 2 pages
Question 11. SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.
  1.    Group by
  2.    With
  3.    Where
  4.    Having
 Discuss Question
Answer: Option B. -> With


WithThe with clause provides away of defining a temporary relation whose definition is available only to the query in which the with clause occurs..


Question 12. Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause.
  1.    Where, having
  2.    Having, where
  3.    Group by, having
  4.    Group by, where
 Discuss Question
Answer: Option B. -> Having, where


Having, whereTo include aggregate functions having clause must be included after where.


Question 13. Subqueries cannot:
  1.    Use group by or group functions
  2.    Retrieve data from a table different from the one in the outer query
  3.    Join tables
  4.    Appear in select, update, delete, insert statements.
 Discuss Question
Answer: Option C. -> Join tables


Join tables


Question 14. Which of the following creates temporary relation for the query on which it is defined ?
  1.    With
  2.    From
  3.    Where
  4.    Select
 Discuss Question
Answer: Option A. -> With


The with clause provides away of defining a temporary relation whose definition is available only to the query in which the with clause occurs..


Question 15. he ________ keyword is used to access attributes of preceding tables or subqueries in the from clause.
  1.    In
  2.    Lateral
  3.    Having
  4.    With
 Discuss Question
Answer: Option B. -> Lateral


Lateral


Question 16. The EXISTS keyword will be true if:
  1.    Any row in the subquery meets the condition only.
  2.    All rows in the subquery fail the condition only.
  3.    Both of these two conditions are met.
  4.    Neither of these two conditions is met. View Answer
 Discuss Question
Answer: Option A. -> Any row in the subquery meets the condition only.


Any row in the subquery meets the condition only.EXISTS keyword checks for existance of condition.


Question 17. Which of the following is not a aggregate function ?
  1.    Avg
  2.    Sum
  3.    With
  4.    Min
 Discuss Question
Answer: Option C. -> With


WithWith is used to create temporary relation and its not a aggregate function.


Question 18. How can you find rows that do not match some specified condition?
  1.    EXISTS
  2.    Double use of NOT EXISTS
  3.    NOT EXISTS
  4.    None of the mentioned is correct.
 Discuss Question
Answer: Option B. -> Double use of NOT EXISTS


Double use of NOT EXISTS


Latest Videos

Latest Test Papers