Free TE0-122 Exam Braindumps (page: 15)

Page 14 of 38

Given the following expressions:

SUM(CASE WHEN maxAWT EQ 0 THEN 1 ELSE 0 END) AS AWT_0
SUM(CASE WHEN maxAWT BETWEEN 1 AND 10 THEN 1 ELSE 0 END) AS AWT1_10
SUM(CASE WHEN maxAWT BETWEEN 11 AND 20 THEN 1 ELSE 0 END) AS AWT11_20
SUM(CASE WHEN maxAWT BETWEEN 21 AND 30 THEN 1 ELSE 0 END) AS AWT21_30
SUM(CASE WHEN maxAWT BETWEEN 31 AND 40 THEN 1 ELSE 0 END) AS AWT31_40
SUM(CASE WHEN maxAWT GE 41 THEN 1 ELSE 0 END) AS AWT_41Plus

What is the common purpose of these expressions?

  1. SUM themaxAWT value that are IN the BETWEEN range.
  2. SUM themaxAWT value that are NOT IN the BETWEEN range.
  3. Count the total occurrences of the BETWEEN range being TRUE.
  4. Count the total occurrences of the BETWEEN range being FALSE.

Answer(s): A



Which is an example of a properly coded correlated subquery?

  1. SELECT *
    FROM employee emp
    WHERE EXISTS
    (SELECT *
    FROM Department dept
    WHERE deptnum = deptnum);
  2. SELECT *
    FROM Employee emp
    WHERE deptnum IN
    (SELECT deptnum
    FROM department dept);
  3. SELECT *
    FROM Employee emp
    WHERE EXISTS
    SELECT *
    FROM Department dept
    WHERE emp.deptnum = dept.deptnum;
  4. SELECT *
    FROM Employee emp
    WHERE EXISTS
    (SELECT *
    FROM Department dept
    WHERE emp.deptnum = dept.deptnum);

Answer(s): B



Which statement is true regarding the use of the DEFAULT attribute function?

  1. It cannot be used as a predicate.
  2. It can be used in an insert statement.
  3. It can return a null value if the argument is 0.
  4. It can be used in the partitioning expression for defining partitioned primary indexes.

Answer(s): C



Given the following table:

Employee Salary Amount
Smith 75, 000
Jones 60, 000
Williams 55, 000
White 35, 000
Johnson 105, 000

Company X and Company Y have merged to become Company Z. The CEO of Company Z wants to know how many employees fall in the same salary range after the merger because of the concern that there are now too many employees in the "Over $100K" range.
Which CASE expression will determine the salary range for an employee?

  1. CASE
    WHEN salary_amount < 50000 THEN "Under $50K"
    WHEN salary_amount < 75000 THEN "Between $50K and $75K"
    WHEN salary_amount < 100000 THEN "Between $75K and $100K"
    ELSE "Over $100K"
    END
  2. CASEsalary_amount
    WHEN salary_amount < 50000 THEN "Under $50K"
    WHEN salary_amount < 75000 THEN "Between $50K and $75K"
    WHEN salary_amount < 100000 THEN "Between $75K and $100K"
    ELSE "Over $100K"
    END
  3. CASE salary_amount
    WHEN < 50000 THEN "Under $50K"
    WHEN < 75000 THEN "Between $50K and $75K"
    WHEN < 100000 THEN "Between $75K and $100K"
    ELSE "Over $100K"
    END
  4. CASE
    WHERE salary_amount < 50000 THEN "Under $50K"
    WHERE salary_amount < 75000 THEN "Between $50K and $75K"
    WHERE salary_amount < 100000 THEN "Between $75K and $100K"
    OR "Over $100K"
    END

Answer(s): D






Post your Comments and Discuss TeraData TE0-122 exam with other Community members:

TE0-122 Discussions & Posts