TeraData TE0-122 Exam (page: 2)
TeraData 12 SQL exam
Updated on: 25-Dec-2025

Viewing Page 2 of 31

Given the following query:

SELECT * FROM Tbl_1
WHERE Col_1 NOT IN
(SELECT Col_2 FROM Tbl_2);

If one of the Col2 values is NULL, what is the impact on the Tbl_1 rows returned?

  1. Tbl_1 will return all rows not in Tbl_2.
  2. Tbl_1 will return all of the non-NULL rows.
  3. No Tbl_1 rows are returned for the entire query.
  4. The Tbl_1 rows that contain a NULL in Col_1 are returned.

Answer(s): B



Given the following:

CREATE TABLE table1_ppi (
column1 INTEGER NOT NULL
, column2 INTEGER
, column3 DATE FORMAT 'yyyy-mm-dd'
)
PRIMARY INDEX (column1)
PARTITION BY RANGE_N(column3
BETWEEN DATE '2002-01-01' AND DATE '2012-12-31' EACH INTERVAL '1' YEAR,
NO RANGE);
ALTER TABLE table1_ppi
MODIFY PRIMARY INDEX
DROP RANGE BETWEEN DATE '2002-01-01' AND DATE '2002-12-31'
EACH INTERVAL '1' YEAR;

What is an effect of the ALTER TABLE statement?

  1. Rows of the dropped partition are deleted.
  2. Rows of the NO RANGE partition are deleted.
  3. Rows are moved from the dropped partition to the save table.
  4. Rows are moved from the dropped partition to the NO RANGE partition.

Answer(s): C



An aggregation query produces the following result:

storeid prodid sales SumSales
----------- --------- ------------- ------------------

1001 A 100000.00 345000.00
1001 C 60000.00 345000.00
1001 D 35000.00 345000.00
1001 F 150000.00 345000.00
1002 A 40000.00 100000.00
1002 C 35000.00 100000.00
1002 D 25000.00 100000.00
1003 A 30000.00 165000.00
1003 B 65000.00 165000.00
1003 C 20000.00 165000.00
1003 D 50000.00 165000.00

Which three queries will produce this result? (Choose three.)

  1. SELECTstoreid
    , prodid
    , sales
    , SUM(sales) OVER (PARTITION BY storeid
    ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS SumSales
    FROM salestbl
    ORDER BY 1, 2;
  2. SELECTstoreid
    , prodid
    , sales
    , SUM(sales) OVER (PARTITION BY storeid) AS SumSales
    FROM salestbl
    ORDER BY 1, 2;
  3. SELECTstoreid
    , prodid
    , sales
    , SUM(sales) OVER (PARTITION BY storeid) AS SumSales
    FROM salestbl
    GROUP BY 1, 2, 3
    ORDER BY 1, 2;
  4. SELECTstoreid
    , prodid
    , sales
    , SUM(sales) OVER (PARTITION BY storeid) AS SumSales
    FROM salestbl
    GROUP BY 1, 2, 3
    ORDER BY 1, 2;

Answer(s): A,B,D



Which three types of user-defined functions does Teradata support? (Choose three.)

  1. Table
  2. Local
  3. Scalar
  4. Global
  5. Aggregate

Answer(s): B,D,E



A SELECT query uses the RANK() OVER (ORDER BY batting_avg DESC) syntax to produce a ranking of baseball players. The top ten baseball players are being ranked based on their batting averages. In the resulting output of the query there will be ten rows. There is a two-way tie for the second position and a three-way tie for the last three positions.
What will be the ranking number of the player in the final row?

  1. 7
  2. 8
  3. 9
  4. 10

Answer(s): D



Viewing Page 2 of 31



Share your comments for TeraData TE0-122 exam with other users:

Anonymous 9/12/2023 12:50:00 PM

can we get tdvan4 vantage data engineering pdf?
UNITED STATES


Anonymous 9/14/2023 4:27:00 AM

question number 4s answer is 3, option c. i
UNITED STATES