self.exam.engine.teradata.nr0 013.exam.q.and.a.18.07.06 arnebook

27
7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 1/27 Exam Name: Teradata SQL v2r5 Exam Type Teradata Exam Code: NR0-013 Total Questions: 120 Page 1 of 27 SelfExamEngine.com Question: 1 Which three statements about view definitions are true? (Choose three.)  A. You can create an index on a view. B. You can use derived tables within a view. C. You can use an ORDER BY within a view. D. You can perform aggregations within a view. E. You can assign new column names within a view.  Answ er: B, D, E Question: 2 Which statement executes a parameterized macro named ABC ?  A. EXEC abc (10, 'ABC'); B. EXEC abc (:10, :'ABC'); C. EXEC abc VALUES(10, 'ABC'); D. EXEC MACRO abc (10, 'ABC');  Answer: A Question: 3 What are three characteristics of views? (Choose three.)  A. Views can contain a WHERE clause. B. Views cannot be used to UPDATE a table. C. Views must change if columns are added to a table. D. Views are not affected if columns are added to a table. E. Views provide an additional level of security or authorization.  Answ er: A, D, E Question: 4 What are three security reasons for using a macro? (Choose three.)  A. It limits the need to grant privileges on tables and views used in the macro. B. The privilege to create the macro can be restricted to specified developers. C. A parameterized macro can be designed to use the parameter to control the table or view to access in the macro. D. A parameterized macro can be designed to use the parameter to restrict access to a subset of the data for a given table or view used in the macro.  Answ er: A ,B ,D Question: 5 The employee table contains emp_no, emp_name and dept_no . The department table contains dept_no and dept_name . Which query returns the employees who work in the Finance Department?  A. SELECT emp_name FROM employee WHERE dept_name LIKE '%Finance%'; B. SELECT emp_name FROM employee WHERE dept_no IN (SELECT e.dept_no FROM employee e WHERE dept_name LIKE '%Finance%'); C. SELECT emp_name FROM department WHERE dept_name LIKE '%Finance%' and dept_no IN (SELECT e.dept_no FROM employee e);

Upload: ujwal-sharat

Post on 18-Feb-2018

232 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 1/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 1 of 27 SelfExamEngine.com

Question: 1Which three statements about view definitions are true? (Choose three.)

 A. You can create an index on a view.B. You can use derived tables within a view.

C. You can use an ORDER BY within a view.D. You can perform aggregations within a view.E. You can assign new column names within a view.

 Answer: B, D, E

Question: 2Which statement executes a parameterized macro named ABC ?

 A. EXEC abc (10, 'ABC');B. EXEC abc (:10, :'ABC');C. EXEC abc VALUES(10, 'ABC');D. EXEC MACRO abc (10, 'ABC');

 Answer: A

Question: 3What are three characteristics of views? (Choose three.)

 A. Views can contain a WHERE clause.B. Views cannot be used to UPDATE a table.C. Views must change if columns are added to a table.D. Views are not affected if columns are added to a table.E. Views provide an additional level of security or authorization.

 Answer: A, D, E

Question: 4What are three security reasons for using a macro? (Choose three.)

 A. It limits the need to grant privileges on tables and views used in the macro.B. The privilege to create the macro can be restricted to specified developers.C. A parameterized macro can be designed to use the parameter to control the table or view to

access in the macro.D. A parameterized macro can be designed to use the parameter to restrict access to a subset

of the data for a given table or view used in the macro.

 Answer: A ,B ,D

Question: 5

The employee table contains emp_no, emp_name and dept_no . The department table containsdept_no and dept_name . Which query returns the employees who work in the FinanceDepartment?

 A. SELECT emp_name FROM employee WHERE dept_name LIKE '%Finance%';B. SELECT emp_name FROM employee WHERE dept_no IN (SELECT e.dept_no FROM

employee e WHERE dept_name LIKE '%Finance%');C. SELECT emp_name FROM department WHERE dept_name LIKE '%Finance%' and dept_no

IN (SELECT e.dept_no FROM employee e);

Page 2: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 2/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 2 of 27 SelfExamEngine.com

D. SELECT emp_name FROM employee WHERE dept_no IN (SELECT d.dept_no FROMdepartment d WHERE dept_name LIKE '%Finance%');

 Answer: D

Question: 6Which two statements about correlated subqueries are true? (Choose two.)

 A. They require temporary table space.B. They require special access rights to create.C. They always join a table to a subset of the same table.D. They allow the user to process data from the same table twice within the query.E. They are one method for locating a maximum or minimum occurrence within groups.

 Answer: D, E

Question: 7The employee table contains only empno and name columns. The department table contains onlydeptno and mgrno columns. Which query produces the names of all employees who are

department managers?

 A. SELECT name FROM employee WHERE mgrno IN (SELECT mgrno FROM department);B. SELECT name FROM employee WHERE empno IN (SELECT mgrno FROM department);C. SELECT name FROM employee WHERE name IN (SELECT mgrno FROM department);D. SELECT name FROM employee WHERE empno NOT IN (SELECT mgrno FROM

department);

 Answer: B

Question: 8Which two types of tables would be considered when trying to avoid Data Dictionary access andTransaction locks? (Choose two.)

 A. VolatileB. DerivedC. PermanentD. Global Temporary

 Answer: A, B

Question: 9Which two statements about Teradata derived tables are true? (Choose two.)

 A. If users can create a derived table, they can also share it with other users.B. More than one derived table can be referenced in the same SQL statement.

C. Derived tables can be referenced by multiple SQL statements in a multi-statement request.D. Derived tables can be used to compare an aggregated value from a table to the individualvalues from the rows of that table.

 Answer: B, D

Question: 10What two types of tables are available when users need to create a small temporary table butonly have spool space allocated to them? (Choose two.)

Page 3: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 3/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 3 of 27 SelfExamEngine.com

 A. VolatileB. DerivedC. PermanentD. Global Temporary

 Answer: A, B

Question: 11Consider the following set of SQL statements: CREATE SET TABLE t1 (a INTEGER, bINTEGER)PRIMARY INDEX (a); INSERT INTO t1 VALUES (1,1); INSERT INTO t1 VALUES (1,2); UPDATEt1 SETb = b + 1 WHERE b = 1; Which statement is true?

 A. The INSERTs and the UPDATE succeed.B. The second INSERT fails because it would create a duplicate primary index value.C. The INSERTs succeed but the UPDATE fails because the syntax is incorrect.D. The INSERTs succeed but the UPDATE fails because it would create a duplicate row.

 Answer: D

Question: 12Which four statements are true about the following MERGE INTO statement? (Choosefour.) MERGE INTO department USING VALUES (105, 'Sales Dept', 770000, 1018) AS Dept(deptnum, deptname, budget, manager) ON Dept.deptnum = department.department_numberWHEN MATCHED THEN UPDATE SET budget_amount = Dept.budget WHEN NOT MATCHEDTHEN INSERT VALUES (Dept.deptnum, Dept.deptname, Dept.budget, Dept.manager);

 A. The USING clause defines the source table row.B. The primary index of the target table must be unique.C. The AS clause specifies the name of the source table.D. The operation performed is an Upsert on the department table.

E. The ON clause must contain the primary index of the target table.

 Answer: A, C, D, E

Question: 13What are two characteristics of UPDATE ? (Choose two .)

 A. It can include a self join.B. It cannot include a subquery.C. It must include a WHERE clause.D. It can be performed on a single table view.

 Answer: A, D

Question: 14Consider the following SQL statement: SELECT city, state, SAMPLEID FROM stores SAMPLEWITH REPLACEMENT WHEN state = 'WI' THEN 4 ELSE 3 END ORDER BY 3; How manydistinct SAMPLEID values are created, assuming 10 rows from every state in the stores table?

 A. 2B. 3C. 4D. 7

Page 4: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 4/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 4 of 27 SelfExamEngine.com

 Answer: A

Question: 15Considering the following SQL statement: SELECT cust_name, cust_addr, SAMPLEID FROMcustomer_table SAMPLE WHEN state = 'CA' THEN .25, .20 ELSE .25, .35; How many distinctSAMPLEID values would be found in the answer set, assuming there are 10 rows from everystate in customer_table ?

 A. 1B. 2C. 4D. None are found. The query results in an error because the sample percentages add to

greater than 1.

 Answer: C

Question: 16Which column(s) does DISTINCT apply to in the following query? SELECT DISTINCT dept_num,

 job_code FROM employee;

 A. job_codeB. dept_numC. dept_num and job_codeD. It does not apply to either column as the query needs parentheses.

 Answer: C

Question: 17Consider the SQL statement: SELECT employee_number, department_number, salary_amountFROM personnel WITH SUM(salary_amount) ORDER BY department_number; Which results doyou get from this SQL statement?

 A. total salaries for each departmentB. no details, just a total of all salariesC. a list of employee salaries with totals by departmentD. a list of employee salaries with a grand total of all salaries

 Answer: D

Question: 18Which three statements are true? (Choose three.)

 A. An outer join requires an ON clause.B. A cross join requires a WHERE clause.

C. An ON clause cannot be specified for a cross join.D. A WHERE clause cannot be specified with a cross join.E. An implicit join is a sequence of table references enclosed in parentheses.F. For an implicit join, the join condition, if any, is specified in the WHERE clause.

 Answer: A, C ,F

Question: 19Which two are correct uses of table aliasing to avoid Cartesian product joins? (Choose two.)

Page 5: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 5/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 5 of 27 SelfExamEngine.com

 A. SEL * FROM table_a A1, table_a WHERE A1.acct1 = table_a.acct2B. SEL * FROM table_a A1, table_a A2 WHERE A1.acct1 = A2.acct2C. SEL * FROM table_a A1, table_a A2 WHERE A1.acct1 = table_a.acct2D. SEL A1.c1, table_a.c2 FROM table_a A1, table_a A2 WHERE A1.acct1 = A2.acct2

 Answer: A, B

Question: 20Exhibit:

Given the two tables and the query shown in the exhibit, what is the result set?

 A. 5, NULLB. 2, NULLC. 2, 2300D. 3, NULLE. 2, 20000

 Answer: B

Question: 21

Where can the join condition for an inner join be specified? (Choose two.)

 A. the ON clauseB. the ANY clauseC. the FROM clauseD. the WHERE clause

 Answer: A, D

Question: 22

Page 6: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 6/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 6 of 27 SelfExamEngine.com

The FULL OUTER JOIN command is designed to produce which type of results?

 A. all unmatched data from both tables, with the matched data eliminatedB. all matched data from both tables, combined with all unmatched data from both tablesC. all rows from the table listed before the JOIN command and the unmatched rows from the

other tableD. all matched data from both tables, and the unmatched rows from the second table listed in

the JOIN clause

 Answer: B

Question: 23Exhibit:

Given the table and the query shown in the exhibit, what is the result set?

 A. SmithB. MillerC. NULLD. FisherE. Adams

 Answer: D

Question: 24Which result do you get from the SELECT SESSION statement ?

 A. the SQLFLAG value for the userB. the session number for the userC. the session transaction mode for the userD. the number of sessions running for the user

 Answer: B

Question: 25Which information does HELP TABLE <tablename> provide about the specified table?

 A. column name, data type, and commentB. column name, index, data type, and commentC. column name, table id, data type, and comment

Page 7: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 7/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 7 of 27 SelfExamEngine.com

D. column name, constraint, data type, and comment

 Answer: A

Question: 26Consider this request in Teradata mode: DELETE t1; Which request performs equivalently in

 ANSI mode?

 A. DROP TABLE t1;B. DELETE FROM t1;C. DELETE FROM t1 ALL;D. DELETE FROM t1; COMMIT;

 Answer: D

Question: 27What does the EXPLAIN output provide to assist the user in query analysis? (Choose two.)

 A. which steps may be processed in parallel

B. what statistics should be collected on a columnC. accurate time measurements for query processingD. details of which indexes, if any, will be used to process the queryE. recommendations to improve the query based on timing and sizing

 Answer: A, D

Question: 28You have an EMPLOYEE table with columns name, dept, salary . Which statement produces areport of employees with the lowest salary in their department?

 A. SELECT name, dept, salary FROM EMPLOYEE ,(SELECT dept as min_dept, MIN(salary) asmin_sal FROM EMPLOYEE GROUP BY 1) a WHERE dept = a.min_dept AND salary =

a.min_sal ;B. SELECT name, dept, salary FROM EMPLOYEE GROUP BY dept HAVING salary =

MIN(salary) ;C. SELECT name, dept, salary FROM EMPLOYEE e HAVING (SEL MIN(salary) FROM

EMPLOYEE f WHERE f.dept = e.dept GROUP BY dep) = salary;D. SELECT name, dept, salary FROM EMPLOYEE e WHERE salary = (SELECT MIN(salary)

FROM EMPLOYEE f GROUP BY dept) AND e.dept = f.dept;

 Answer: A

Question: 29When processing a SELECT statement that includes WHERE , GROUP BY, and HAVINGclauses, what is the order of evaluation during execution?

 A. WHERE, HAVING, GROUP BYB. WHERE, GROUP BY, HAVINGC. HAVING, GROUP BY, WHERED. GROUP BY, HAVING, WHEREE. GROUP BY, WHERE, HAVINGF. HAVING, WHERE, GROUP BY

 Answer: B

Page 8: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 8/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 8 of 27 SelfExamEngine.com

Question: 30Given the query SELECT AVG(column1) FROM t1; where t1 is an empty table, what is theresult?

 A. 0B. NullC. ErrorD. No record found

 Answer: B

Question: 31Consider the following SQL statement: SELECT colA, colB, SUM(colX) FROM table1 WHEREcolA > 45 GROUP BY colA HAVING SUM(colX) = 20; Which statement is true ?

 A. The query succeeds.B. The query fails because of the WHERE clause.C. The query fails because of the HAVING clause.D. The query fails because of the GROUP BY clause.

 Answer: D

Question: 32The MINUS operator is equivalent to _____.

 A. LESSB. NOT INC. EXCEPTD. SUBTRACTE. INTERSECT

 Answer: C

Question: 33Table_1 has only one column and contains these values (100, 200, 300, 400, 500). Table_2 hasonly one column and contains these values (100, 200, 250, 275, 500). If you use the EXCEPToperator between these tables, where Table_1 is the first table, what would the result setcontain?

 A. 250, 275B. 300, 400C. 100, 200, 500D. 250, 275, 300, 400E. 100, 200, 250, 275, 300, 400, 500F. 100, 100, 200, 200, 250, 275, 300, 400, 500, 500

 Answer: B

Question: 34Which Teradata SQL function determines the position where a substring begins within a string?

 A. POSB. INDEXC. CHARPOSD. SUBINDEX

Page 9: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 9/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 9 of 27 SelfExamEngine.com

E. SUBSTRING

 Answer: B

Question: 35Which formatting string applied to a timestamp will produce the following output? Monday,November 04,200203:24:22 +00:00

 A. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBZ 'B. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBT 'C. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBZ 'D. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBT '

 Answer: C

Question: 36Which statement returned the following answer set? TITLE(employee_number) ----------------------employee#

 A. SELECT TITLE(employee#) FROM Employee;B. SELECT DISTINCT TITLE(employee_number) FROM Employee;C. SELECT DISTINCT TITLE(employee#) FROM Employee;D. SELECT DISTINCT(TITLE(employee#)) FROM Employee;

 Answer: B

Question: 37Table tmp_tbl contains following four rows: c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60. 923550. Which answer set is returned with the following SELECT statement ? SELECT * FROMtmp_tbl WHERE c1 = 9135 OR c1 = 9235 AND c2 < 51.00 ORDER BY 1;

 A. c1 c2 ----------- ------- 9135 50. 9135 60. 9235 50.B. c1 c2 ----------- ------- 9135 50. 9235 50. 9235 60.C. c1 c2 ----------- ------- 9135 50. 9235 50.D. c1 c2 ----------- ------- 9135 60. 9135 50.E. c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60.F. c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60. 9235 50. ----------- ------- 9135 60. 9135 50.

9235 60. 923550. 9135 60. 9135 50. 9235 60. 9235 50. 9135 50. 9235 60. 9235 50. 9235 60. 9235 50.

 Answer: A

Question: 38How does a null sort during an ascending sort?

 A. It sorts after negative values and after blank character values.B. It sorts after negative values and before blank character values.C. It sorts before negative values and after blank character values.D. It sorts before negative values and before blank character values.

 Answer: D

Quest ion : 39 DRAG DROPYou work as a DBA at Company.com. Your trainee Company is curious in the proper order of

Page 10: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 10/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 10 of 27 SelfExamEngine.com

Evaluation precedence. She asks you to explain. You need to place each step in its proper order.

 Answer:Explanation:

sQuestion: 40Which two symbols serve as wildcards in the string expression of the LIKE operator ?

 A. _ and $B. $ and %C. & and %D. _ and %

Page 11: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 11/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 11 of 27 SelfExamEngine.com

 Answer: D

Question: 41Which logical comparison is equivalent to " x BETWEEN y AND z" ?

 A. ( (x > y) AND (x < z))B. ((x > y) AND (x <= z))C. ((x >= y) AND (x < z))D. ((x >= y) AND (x <=z))

 Answer: D

Question: 42Which two expressions are used to distinguish null data from n on- null data? (Choose two.)

 A. = NULLB. IS NULLC. < > NULLD. NULL ONLY

E. IS NOT NULL

 Answer: B, E

Question: 43Within ordered analytic functions, what is signified by the syntax element UNBOUNDEDPRECEDING ?

 A. the one row prior to the current rowB. the entire partition before the current rowC. the number of rows before the current rowD. the entire partition before and after the current row

 Answer: B

Question: 44Within a window, which SQL command determines the group or groups over which an ordered

 Analytical function executes?

 A. ROWSB. ORDER BYC. GROUP BYD. PARTITION BY

 Answer: D

Question: 45Which two statements are true? (Choose two.)

 A. Conversion of numeric to integer truncates any decimal portion.B. Conversion of numeric to integer rounds up any decimal portion.C. CAST can be used to convert a byte data type to another data type.D. CAST can be used to convert a non-byte data type to another non-byte data type.

 Answer: A, D

Page 12: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 12/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 12 of 27 SelfExamEngine.com

Question: 462.1**2 gives 4.41. What is the result of SELECT SQRT(-4.41) ?

 A. -2.1B. -2C. 2D. 2.1E. Error: Bad argument for SQRT function

 Answer: E

Question: 47What is the result of the following query? SELECT ADD_MONTHS (CURRENT_DATE, 40*3);

 A. the current date plus 10 yearsB. the current date plus 120 daysC. the current date plus 120 yearsD. the current date plus 40 months, three days

 Answer: A

Question: 48What is the result of SELECT CAST('bb12345' AS CHAR(3)) in Teradata mode? (Note: b =blank)

 A. 1B. 'bb1'C. 123D. 345E. '123'F. '345'

 Answer: B

Question: 49Which statement creates a table that is initialized with the result of a query?

 A. CREATE TABLE t19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2);B. CREATE TABLE t19 LIKE (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH DATA;C. CREATE TABLE t19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH DATA;D. CREATE TABLE 19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH RESULTS;

 Answer: C

Question: 50

Which two can be specified in the CREATE TABLE statement? (Choose two.)

 A. join indexB. data block sizeC. before and after journalingD. maximum permanent space

 Answer: B, C

Question: 51

Page 13: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 13/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 13 of 27 SelfExamEngine.com

What are two characteristics of the CHECK constraint? (Choose two.)

 A. It will not work on the primary index column.B. Any Boolean comparison operator can be used.C. Multiple columns can be checked at the table level.D. A column on another table can be checked at the table level.

 Answer: B, C

Question: 52What are two characteristics of the FLOAT data type? (Choose two.)

 A. The internal length is 4 bytes.B. The internal length is 8 bytes.C. It is synonymous with REAL and DOUBLE PRECISION .D. Has a minimum value of -32,768 and maximum value of 32,767.

 Answer: B, C

Question: 53Which three statements about dates are true? (Choose three.)

 A. DATE values are stored internally as integers.B. DATE is a data type as well as a built-in function.C. CURRENT_DATE is a data type as well as a built-in function.D. CURRENT_DATE is a column in SYS_CALENDAR.CALENDAR .E. The built-in functions DATE and CURRENT_DATE are equivalent.

 Answer: A, B, E

Question: 54What data type results from the following calculation? SELECT DATE '2003-02-15' - DATE '2003-

01-15';

 A. DATEB. INTEGERC. INTERVAL DAYD. INTERVAL MONTH

 Answer: B

Question: 55Which statement about data types is correct?

 A. An INTERVAL times a number results in a number.

B. A TIMESTAMP minus a TIMESTAMP results in a TIMESTAMP .C. A TIMESTAMP minus a TIMESTAMP results in an INTERVAL .D. A TIMESTAMP minus an INTERVAL results in an INTERVAL .

 Answer: C

Question: 56What is the result of the following query calculation? SELECT EXTRACT (MINUTE FROM(TIMESTAMP'2002-12-15 09:45:20' + INTERVAL '05 02:10' DAY TO MINUTE));

Page 14: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 14/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 14 of 27 SelfExamEngine.com

 A. 11B. 22C. 30D. 47E. 55

 Answer: E

Question: 57What is another way to write the following expression? CASE WHEN x IS NOT NULL THEN xWHEN y IS NOT NULL THEN y ELSE NULL END

 A. NULLIF (x, y)B. COALESCE (x, y)C. ZEROIFNULL (x, y)D. COMPRESS NULL (x, y)

 Answer: B

Question: 58Which statement has correct syntax?

 A. SELECT CASE WHEN 'Boston' THEN 'Y' ELSE 'N' END FROM table_city;B. SELECT city, CASE WHEN city = 'Boston' THEN 'Y' ELSE 'N' END FROM table_city;C. SELECT CASE WHEN city = 'Boston' THEN city = 'Y' ELSE 'N' END FROM table_city;D. SELECT CASE WHEN table_city.city IN (SELECT u.city FROM u) THEN 'Y' ELSE 'N' END

FROM table_city;

 Answer: B

Question: 59Which SQL statement is a syntactically correct example of a Searched CASE expression?

 A. SELECT CASE IF x=1 THEN 'Yes' ELSE NULL END FROM Table_A;B. SELECT CASE x WHEN 1 THEN 'Yes' ELSE 'No' END FROM Table_A;C. SELECT CASE WHEN x=1 THEN 'Yes' ELSE 'No' END FROM Table_A;D. SELECT CASE SEARCH x FOR 1 IF = THEN 'Yes' ELSE 'No' FROM Table_A;

 Answer: C

Question: 60What is the expected result of the following SQL statement? SELECT SUM(CASE part_noWHEN '1' THEN ship_amt ELSE 0 END) / SUM(ship_amt) FROM Table_T;

 A. the total shipping cost attributed to all parts delivered

B. the fraction of the shipping cost attributed to part number 1C. an error since you cannot place a CASE statement within a SUM statementD. the total shipping cost attributed to part number 1 and the total shipping cost of all parts

 Answer: B

Question: 61Exhibit:

Page 15: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 15/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 15 of 27 SelfExamEngine.com

Given the two tables and the query shown in the exhibit, how many rows does the result sethave?

 A. 2B. 3C. 4D. 5

E. 6

 Answer: C

Question: 62When is a table alias required?

 A. to enhance join processingB. when joining a table to itselfC. when processing subqueriesD. when joining more than two tables

 Answer: B

Question: 63What is the join type in the following query? SELECT workers.name, workers.yrsexp,workers.deptno, managers.name, managers.yrsexp FROM employee workers, employeemanagers WHERE managers.deptno = workers.deptno;

 A. self joinB. cross joinC. nested joinD. Cartesian join

Page 16: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 16/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 16 of 27 SelfExamEngine.com

 Answer: A

Question: 64Which two statements have valid syntax and include an implicit join? (Choose two.)

 A. SELECT * FROM t1 INNER JOIN t2 ON t1.a1=t2.a2, t3 WHERE t1.b1=t3.b3;B. SELECT * FROM t1 JOIN t2, t3 ON t1.t1=t2.a2 WHERE t1.b1=t3.b3;C. SELECT * FROM t1, t2, t3 ON t1.a1=t2.a2 AND t2.b2=t3.b3;D. SELECT * FROM t1, t2, t3 WHERE t1.a1=t2.a2 AND t1.a1=t3.b3;E. SELECT * FROM t1 INNER JOIN (t2, t3) ON t1.a1=.t2.a2 AND t2=b2=t3.b3;

 Answer: A, D

Question: 65Consider the following query: SELECT d.dept_no, d.name, e.name FROM department d INNERJOIN employee e ON e.dept_no = d.dept_no; Which is true?

 A. It returns information about employees who have no department number.

B. It returns information about departments that have no employees assigned to them.C. The ON clause can be replaced with a WHERE clause to produce the same results.D. It returns an output row for each successful match between employee and department.

 Answer: D

Question: 66Con sider the following: SELECT e.name FROM department d RIGHT OUTER JOIN employee eON d.dept_no = e.dept_no LEFT OUTER JOIN job j ON e.job_code = j.job_code; What could theresult set contain? (Choose three.)

 A. all employeesB. jobs without employees

C. departments with no employeesD. employees without departmentsE. employees with invalid departments

 Answer: A, D, E

Question: 67What are two reasons to use macros? (Choose two.)

 A. to have a query automatically ask for input valuesB. to have the ability to pass parameter(s) to a queryC. to have a simple way to execute a fixed series of SQL statementsD. to have a simple way to create multiple tables in the same macro consistently

 Answer: B, C

Question: 68What are three security reasons for using a macro? (Choose three.)

 A. It limits the need to grant privileges on tables and views used in the macro.B. The privilege to create the macro can be restricted to specified developers.C. A parameterized macro can be designed to use the parameter to control the table or view to

access in the macro.

Page 17: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 17/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 17 of 27 SelfExamEngine.com

D. A parameterized macro can be designed to use the parameter to restrict access to a subsetof the data for a given table or view used in the macro.

 Answer: A, B ,D

Question: 69Which three are allowed within a view definition? (Choose three.)

 A. UPDATEB. HAVINGC. ORDER BYD. GROUP BYE. LEFT OUTER JOIN

 Answer: B, D, E

Question: 70What is the correct syntax for creating a parameterized macro, including the use of thatparameter within the macro?

 A. CREATE MACRO abc (INTEGER x) AS (SELECT Emp_Name FROM Table_1 WHEREEmp_No = :x;);

B. CREATE MACRO abc (:x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHEREEmp_No = x;);

C. CREATE MACRO abc (x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHEREEmp_No = :x;);

D. CREATE MACRO abc (x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHEREEmp_No = x;);

 Answer: C

Question: 71

What is the default order of precedence of the logical operators AND, NOT, and OR ?

 A. NOT, OR, ANDB. AND, OR, NOTC. NOT, AND, ORD. AND, NOT, OR

 Answer: C

Question: 72What does COUNT(*) return, if a single column table contains 100 rows with 37 of them beingnull ?

 A. 63B. 100C. nullD. 63 with a warning message

 Answer: B

Question: 73Which two symbols serve as wildcards in the string expression of the LIKE operator ?

Page 18: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 18/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 18 of 27 SelfExamEngine.com

 A. _ and $B. $ and %C. & and %D. _ and %

 Answer: D

Question: 74Which WHERE statement never returns any rows? SELECT EMPNO, DEPTNO, SALARY FROMRETAIL.EMPLOYEE

 A. WHERE (DEPTNO = 2080 OR DEPTNO = 2200) OR (SALARY < 90000 AND SALARY> 40000)

B. WHERE (DEPTNO = 2080 OR DEPTNO = 2200) AND (SALARY < 90000 OR SALARY> 40000)

C. WHERE (DEPTNO = 2080 OR DEPTNO = 2200) AND (SALARY < 90000 AND SALARY> 40000)

D. WHERE (DEPTNO = 2080 AND DEPTNO = 2200) AND (SALARY < 90000 AND SALARY> 40000)

 Answer: D

Question: 75Which two expressions are used to distinguish null data from n on- null data? (Choose two.)

 A. = NULLB. IS NULLC. < > NULLD. NULL ONLYE. IS NOT NULL

 Answer: B, E

Question: 76Consider the following data for column name where the column is non-case specific: Alison DawnSusan Geoff Bob Gorm Paul What is the result set for the following query in Teradata mode?SELECT name FROM table_names WHERE name BETWEEN 'a' AND 'go';

 A. Dawn, Bob, Geoff, GormB. Alison, Bob, Dawn, GeoffC. Dawn, Bob, Geoff, Gorm, PaulD. Alison, Bob, Dawn, Geoff, Gorm

 Answer: B

Question: 77Which statement about data types is correct?

 A. An INTERVAL times a number results in a number.B. A TIMESTAMP minus a TIMESTAMP results in a TIMESTAMP .C. A TIMESTAMP minus a TIMESTAMP results in an INTERVAL .D. A TIMESTAMP minus an INTERVAL results in an INTERVAL .

 Answer: C

Page 19: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 19/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 19 of 27 SelfExamEngine.com

Question: 78What is the result of the following query calculation? SELECT EXTRACT (MINUTE FROM(TIMESTAMP '2002-12-15 09:45:20' + INTERVAL '05 02:10' DAY TO MINUTE));

 A. 11B. 22C. 30D. 47E. 55

 Answer: E

Question: 79Which three statements about dates are true? (Choose three.)

 A. DATE values are stored internally as integers.B. DATE is a data type as well as a built-in function.C. CURRENT_DATE is a data type as well as a built-in function.D. CURRENT_DATE is a column in SYS_CALENDAR.CALENDAR .

E. The built-in functions DATE and CURRENT_DATE are equivalent.

 Answer: A, B, E

Question: 80What data type results from the following calculation? SELECT DATE '2003-02-15' - DATE '2003-01-15';

 A. DATEB. INTEGERC. INTERVAL DAYD. INTERVAL MONTH

 Answer: B

Question: 81SAMPLEID expressions can appear with the SAMPLE command in which two SQL clauses?(Choose two.)

 A. WHEREB. SELECTC. GROUP BYD. ORDER BY

 Answer: B, D

Question: 82Considering the following SQL statement: SELECT state, SAMPLEID FROM stores SAMPLEWITH REPLACEMENT WHEN state = 'CA' THEN 2, 4 WHEN state = 'MI' THEN 5, 7 ELSE 50ORDER BY 2; How many distinct SAMPLEID values will appear in the answer set, assuming 10rows from every state in the stores table?

 A. 2B. 4C. 5D. 68

Page 20: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 20/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 20 of 27 SelfExamEngine.com

 Answer: C

Question: 83What is the best description of this SQL statement? SELECT name, salary, avgsal FROM(SELECT AVG(salary) FROM employee) emp_temp (avgsal) , employee WHERE salary >avgsal ORDER BY salary DESC;

 A. It is not valid.B. It uses a derived table with aggregate.C. It uses a nested subquery with aggregate.D. It uses a correlated subquery with aggregate.

 Answer: B

Question: 84Which three statements about subqueries are true? (Choose three.)

 A. They can be nested.

B. They can use ORDER BY .C. They generate a distinct list of values.D. They can be the object of an IN or NOT IN .

 Answer: A, C, D

Question: 85What is the result of the following query? SELECT last_name FROM employee ee WHEREee.salary_amount > (SELECT AVG (em.salary_amount) FROM employee em WHEREem.department_number = ee.department_number);

 A. all employees whose salaries are greater than the average salaryB. all employees whose salaries are greater than their departments' average salaries

C. all employees whose salaries are greater than the average of the average department salaryD. one employee per department whose salary is greater than the department's average salary

 Answer: B

Question: 86Which statement returned the following answer set? TITLE(employee_number) ----------------------employee#

 A. SELECT TITLE(employee#) FROM Employee;B. SELECT DISTINCT TITLE(employee_number) FROM Employee;C. SELECT DISTINCT TITLE(employee#) FROM Employee;D. SELECT DISTINCT(TITLE(employee#)) FROM Employee;

 Answer: B

Question: 87What is the result of the following query? SELECT INDEX (SUBSTRING ('DONNA KRAUS'FROM 6 FOR 5), 'RAU');

 A. 1B. 2C. 3

Page 21: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 21/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 21 of 27 SelfExamEngine.com

D. 4

 Answer: C

Question: 88Which formatting string applied to a timestamp will produce the following output? Monday,November 04,2002 03:24:22 PM

 A. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBZ 'B. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBZ 'C. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBT 'D. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBT '

 Answer: D

Question: 89Which rows will this UNION operation return to the user? SELECT col_1 FROM table_a UNIONSELECT col_6 FROM table_b;

 A. all rows in table_a that have matching rows in table_bB. all rows from table_a and table_b, including duplicate rowsC. all rows from table_a and table_b, with duplicate rows eliminatedD. all rows from table_a and table_b, with output formatted by table_b

 Answer: C

Question: 90Which set operator could be used to perform the equivalent of an outer join?

 A. MINUSB. UNIONC. EXCEPT

D. INTERSECT

 Answer: B

Question: 91While using ordered analytic functions, which SQL command specifies the window or subset ofdata?

 A. IN ()B. OVER ()C. WINDOW ()D. GROUP BY ()

 Answer: B

Question: 92Within ordered analytic functions, what is signified by the syntax element UNBOUNDEDPRECEDING ?

 A. the one row prior to the current rowB. the entire partition before the current rowC. the number of rows before the current rowD. the entire partition before and after the current row

Page 22: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 22/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 22 of 27 SelfExamEngine.com

 Answer: B

Question: 93What are two characteristics of the CHECK constraint? (Choose two.)

 A. It will not work on the primary index column.B. Any Boolean comparison operator can be used.C. Multiple columns can be checked at the table level.D. A column on another table can be checked at the table level.

 Answer: B, C

Question: 94What are two characteristics of COMPRESS ? (Choose two.)

 A. It will compress repeating 1s and 0s.B. It supports multiple values per column.C. It can be used on character data types only.

D. It can be defined so a specific value is not stored in each row.

 Answer: B, D

Question: 95Which statement creates a table that is initialized with the result of a query?

 A. CREATE TABLE t19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2);B. CREATE TABLE t19 LIKE (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH DATA;C. CREATE TABLE t19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH DATA;D. CREATE TABLE 19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH RESULTS;

 Answer: C

Question: 96Which two can be specified in the CREATE TABLE statement? (Choose two.)

 A. join indexB. data block sizeC. before and after journalingD. maximum permanent space

 Answer: B, C

Question: 97Which condition is always true?

 A. SUM(a)+SUM(b) = SUM(a+b)B. SUM(COALESCE(a,0))+SUM(COALESCE(b,0)) = SUM(a+b)C. SUM(a)+SUM(b) = SUM(COALESCE(a,0)+COALESCE(b,0))D. SUM(COALESCE(a,0))+SUM(COALESCE(b,0)) = SUM(COALESCE(a,0)+COALESCE(b,0))

 Answer: D

Question: 98Which SQL clauses always perform the same type of operations?

Page 23: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 23/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 23 of 27 SelfExamEngine.com

 A. QUALIFY and HAVINGB. DISTINCT and QUALIFYC. HAVING and GROUP BYD. HAVING and DISTINCT

 Answer: A

Question: 99You have an EMPLOYEE table with columns name, salary . Which two SQL statements producea total salary, for only employees having salary greater than the average salary? (Choose two.)

 A. SEL SUM(salary) FROM EMPLOYEE ,(SEL AVG(salary) as avg_sal FROM EMPLOYEE ) eWHERE salary > avg_sal;

B. SEL SUM(salary) FROM EMPLOYEE HAVING salary > AVG(salary);C. SEL SUM(salary) FROM EMPLOYEE HAVING salary > (SEL AVG(salary) FROM

EMPLOYEE);D. SEL SUM(salary) FROM EMPLOYEE e WHERE salary > (SEL AVG(salary) FROM

EMPLOYEE);

E. SEL SUM(avg_sal) FROM EMPLOYEE ,(SEL AVG(salary) as avg_sal FROM EMPLOYEEHAVING salary > avg_sal) e;

 Answer: A, D

Question: 100Employee_ID Name Salary Dept_No 1 Miller 10 2 2 Miller 20 2 3 Hurd 40 3 4 Stevens 10 2SELECT COUNT(*) FROM employee GROUP BY name, dept_no HAVING COUNT(*) > 1;Given the table and the query shown above, how many rows are in the result set?

 A. 1B. 2C. 3

D. 30E. 80

 Answer: A

Question: 101The choice of ANSI vs. Teradata mode affects which three items? (Choose three.)

 A. data conversionsB. rounding behaviorC. case sensitivity defaultsD. transaction protocol behavior

 Answer: A, C, D

Question: 102Which command will display the account you are currently using?

 A. HELP USER;B. HELP SESSION;C. HELP ACCOUNT;D. EXPLAIN ACCOUNT;E. SELECT 'ACCOUNT';

Page 24: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 24/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 24 of 27 SelfExamEngine.com

 Answer: B

Question: 103Which two statements about the ACCOUNT function are true? (Choose two.)

 A. It has no arguments.B. It cannot be used in a macro.C. Value is provided by the parser.D. It must be coded between quotes.

 Answer: A, C

Question: 104What does the EXPLAIN output provide to assist the user in query analysis? (Choose two.)

 A. which steps may be processed in parallelB. what statistics should be collected on a columnC. accurate time measurements for query processing

D. details of which indexes, if any, will be used to process the queryE. recommendations to improve the query based on timing and sizing

 Answer: A, D

Question: 105Which option is available with Global Temporary tables?

 A. Identity ColumnB. Collect StatisticsC. Permanent JournalingD. Referential Constraints

 Answer: B

Question: 106What type of table is recommended when users need to share a table definition but not share thedata?

 A. VolatileB. DerivedC. PermanentD. Global Temporary

 Answer: D

Question: 107Which three statements are true about Global and Volatile Temporary tables? (Choose three.)

 A. Global Temporary table definitions are maintained in the Data Dictionary.B. Volatile Temporary tables must be created before they can be materialized.C. Volatile Temporary tables are materialized in spool space and their definition is maintained in

cache.D. Volatile Temporary table space requirements are charged against the user's allocation of

temporary space.

Page 25: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 25/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 25 of 27 SelfExamEngine.com

 Answer: A, B, C

Question: 108Which SQL statement is a syntactically correct example of a valued CASE expression?

 A. SELECT CASE IF x=1 THEN 'Yes' ELSE NULL END FROM Table_A;B. SELECT CASE x WHEN 1 THEN 'Yes' ELSE 'No' END FROM Table_A;C. SELECT CASE WHEN x=1 THEN 'Yes' ELSE 'No' END FROM Table_A;D. SELECT CASE SEARCH x FOR 1 IF = THEN 'Yes' ELSE 'No' FROM Table_A;

 Answer: B

Question: 109Considering the following SQL, which statement is true assuming that there are no rows inTable_T where x is null? SELECT COUNT(*) FROM Table_T WHERE x = CASE WHEN y=2THEN 1 END ;

 A. The SQL statement is not syntactically correct because no ELSE statement exists within theCASE statement.

B. The SQL statement is not syntactically correct because a CASE statement cannot be usedwithin a WHERE clause.

C. The SQL statement is syntactically correct and a count of the number of rows from Table_Twhere y=2 and x=1 will be returned.

D. The SQL statement is syntactically correct and a count of the number of rows from Table_Twhere either y=2 or x=1 will be returned.

 Answer: C

Question: 110What is another way to write the following expression? CASE WHEN x = y THEN NULL ELSE xEND

 A. NULLIF (x, y)B. COALESCE (x, y)C. ZEROIFNULL (x, y)D. COMPRESS NULL (x, y)

 Answer: A

Question: 111Consider the expression: SELECT Name, COALESCE (HomePhone, OfficePhone,MessageService) FROMPhoneDir; If only the HomePhone is NULL , what is returned?

 A. Name with '?'

B. a n e rror m essageC. Name with OfficePhoneD. Name with OfficePhone and MessageService

 Answer: C

Question: 112Consider the following set of SQL statements: CREATE MULTISET TABLE t1 (a INTEGER, bINTEGER) PRIMARY INDEX (a); INSERT INTO t1 VALUES (1,1); INSERT INTO t1 VALUES(1,2); UPDATE t1 SET b = b + 1 WHERE a = 1; Which statement is true?

Page 26: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 26/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

Page 26 of 27 SelfExamEngine.com

 A. The INSERTs and the UPDATE succeed.B. The second INSERT fails because it would create a duplicate primary index value.C. The INSERTs succeed but the UPDATE fails because the syntax is incorrect.D. The INSERTs succeed but the UPDATE fails because it would create a duplicate row.

 Answer: A

Question: 113Consider the following statement: UPDATE T1 SET ColA = ColB WHERE ColB IS NOT NULL;Under which three conditions will the query succeed? (Choose three.)

 A. ColA is defined as INTEGER and ColB is defined as DATE .B. ColA is defined as TIMESTAMP and ColB is defined as DATE .C. ColA is defined as INTEGER and ColB is defined as SMALLINT .D. ColA is defined as CHAR(2) and ColB is defined as VARCHAR(2) .

 Answer: A, C, D

Question: 114Which four statements are true about executing the following macro? (Choose four.) CREATEMACRO dept_budget (deptno INT, budgamt DEC(10,2))AS (MERGE INTO department USING(SELECT :deptno, dept_name, :budgamt FROM dept_name_assignment WHERE department_number = :deptno) AS Dept(deptnum, deptname, budget) ON Dept.deptnum =department.department_number WHEN MATCHED THEN UPDATE SET budget_amount =Dept.budget, department_name = Dept.deptname WHEN NOT MATCHED THEN INSERTVALUES (Dept.deptnum, Dept.deptname, Dept.budget, NULL););

 A. The primary index of the target table must be unique.B. The AS clause within the macro specifies the name of the source table.C. The USING subquery may return at most a single row.D. The ON clause must contain the primary index of the target table.

E. If zero rows are returned by the subquery, neither the update nor the insert occurs.

 Answer: B, C, D, E

Question: 115What is the result of the following query where birthdate has the DATE data type ? SELECT (CURRENT_ DATE - birthdate ) FROM birthrecord;

 A. the day of birthB. the month of birthC. the days since birthD. the years since birth

E. the months since birth

 Answer: C

Question: 116What is the result of SELECT CAST(100000.6 AS SMALLINT) ?

 A. 100000B. 100001C. 100000.6

Page 27: Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

7/23/2019 Self.exam.Engine.teradata.nr0 013.Exam.Q.and.a.18.07.06 ARNEBOOK

http://slidepdf.com/reader/full/selfexamengineteradatanr0-013examqanda180706-arnebook 27/27

Exam Name: Teradata SQL v2r5

Exam Type Teradata

Exam Code: NR0-013 Total Questions: 120

D. Error: Numeric overflow occurred during computation.

 Answer: D

Question: 117Which statement is true?

 A. When an integer value is added to a float value, neither is converted.B. When an integer value is added to a float value, the integer is first converted to a float.C. When an integer value is added to a float value, the float is first converted to an integer.D. You cannot add different data types, so must first use the CAST function to make them the

same.

 Answer: B

Question: 118What is the displayed result of SELECT 3 / 4 * 100.00 ?

 A. .00

B. .75C. 75D. 75.00

 Answer: A

Question: 119Consider the SQL statement: SELECT name, lot, weight FROM participants WITH SUM(weight)BY lot WITH AVG(weight), SUM(weight) ORDER BY name, lot; Which answer set is returnedfrom this SQL statement?

 A. a list of all participants with their total weight and a subtotal, grand total and average weightfor all lots

B. a list of all participants with average weight for each lot and both the average and total weightfor all lots

C. a list of all participants with average weight and subtotal of weight for each lot and a totalweight for all lots

D. a list of all participants with a subtotal of weight for each lot and both the average and totalweight for all lots

 Answer: D

Question: 120Which column(s) does DISTINCT apply to in the following query? SELECT DISTINCT dept_num,

 job_code FROM employee;

 A. job_codeB. dept_numC. dept_num and job_codeD. It does not apply to either column as the query needs parentheses.

 Answer: C