Questions about Teradata

Tools & Utilities

Questions about Teradata

Good day everyone,

 

I have some questions regarding teradata and i need to know the correct answers :

 

1- create table t1( col1 int, col2 int) primary index(col2);

 

What is the correct answer

a) UPI on col1

b)NUPI on col2

c) NUSI on col2

d) None of the above

 


2- What the following SQL will output?

SELECT customer_number, zip_code

FROM location

WHERE zip_code MOD 10000 = 0;

a)All rows from location table where zip codes end with only one zero.

b) Throws an error ecause zip_code can't be zero

c) All rows from location table where zip codes end with four zeroes

d) Gives "Division By Zero" error

 

3- Consider the following SQL:

 

SELECT dept_no, dept_name,

,SUM (grant_amount)

FROM department

GROUP BY dept_no;

 

What is should return when executed :

 

  1. Shows the total grant_amount for each department
  2. Shows the total grant_amount for each department and department name
  3. Gives a syntax error as GROUP BY should come before FROM clause
  4. Give as error as non-aggregates in the SELECT list must also appear in the GROUP BY clause.

 

 

4- CREATE MULTISET TABLE t1 (a INTEGER, b INTEGER)

UNIQUE PRIMARY INDEX (a);

INSERT INTO t1 VALUES (1,1);

INSERT INTO t1 VALUES (1,2);

UPDATE t1 SET b = b + 1 WHERE B = 1;

 

Which statement is true ?

a) The INSERTs succeed but the UPDATE fails

b) The CREATE TABLE fails

c) The INSERTs and the UPDATE succeed

d) The second INSERT fails

 

2 REPLIES 2
Teradata Employee

Re: Questions about Teradata

Hi.

 

Do you really want us to do your homework?

 

All the questions can be easily answered with a little bit of reading of the documentation.

 

Regards.

 

Carlos.

Supporter

Re: Questions about Teradata

Dear MASfour,

 

These questions look like questions from a Teradata certification exam. If they are you are violating TCPP agreement.

Please confirm source of your questions.

If not from TCPP, they are easily answered.

 

Cheers,

Teradata Frank, Certified Master