Multiple choice

What will be the conceptual order of evaluation of the following select statements? (a) First, the Cartesian product of all tables in the 'form' clause is formed. (b) From this, rows not satisfying the 'where' condition are eliminated. (c) Groups not satisfying the having clause are then eliminated. (d) The remaining rows are grouped in accordance with 'group by' clause. (e) The UNION, INTERSECT, EXCEPT is taken after each subquery is evaluated. (f) If the keyword DISTINCT is present, duplicate rows are eliminated. (g) The expressions of the select clause target list are evaluated. (h) The set of all selected rows is sorted if an ORDER BY is present.

  1. a - b - c - d - e - f - g - h

  2. a - b - d - c - g - f - e - h

  3. a - b - d - h - c - g - f - e

  4. a - b - e - g - f - c - d - h

  5. none of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Option 2 is the correct answer. If we alter any of the statements in the sequence, we get a wrong result.