You are on page 1of 27

Exam Name

:
Exam Type
Exam Code:

Teradata SQL v2r5
Teradata
NR0-013

Total Questions:

120

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.
Answer: 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.
Answer: 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.
Answer: 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);

Page 1 of 27

© SelfExamEngine.com

Exam Name:
Exam Type
Exam Code:

Teradata SQL v2r5
Teradata
NR0-013

Total Questions:

120

D. SELECT emp_name FROM employee WHERE dept_no IN (SELECT d.dept_no FROM
department d WHERE dept_name LIKE '%Finance%');
Answer: D
Question: 6
Which 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: 7
The employee table contains only empno and name columns. The department table contains only
deptno and mgrno columns. Which query produces the names of all employees who are
department managers?
A.
B.
C.
D.

SELECT name FROM employee WHERE mgrno IN (SELECT mgrno FROM department);
SELECT name FROM employee WHERE empno IN (SELECT mgrno FROM department);
SELECT name FROM employee WHERE name IN (SELECT mgrno FROM department);
SELECT name FROM employee WHERE empno NOT IN (SELECT mgrno FROM
department);

Answer: B
Question: 8
Which two types of tables would be considered when trying to avoid Data Dictionary access and
Transaction locks? (Choose two.)
A. Volatile
B. Derived
C. Permanent
D. Global Temporary
Answer: A, B
Question: 9
Which two statements about Teradata derived tables are true? (Choose two.)
A.
B.
C.
D.

If users can create a derived table, they can also share it with other users.
More than one derived table can be referenced in the same SQL statement.
Derived tables can be referenced by multiple SQL statements in a multi-statement request.
Derived tables can be used to compare an aggregated value from a table to the individual
values from the rows of that table.

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

Page 2 of 27

© SelfExamEngine.com

manager). How many distinct SAMPLEID values are created. The USING clause defines the source table row. 1018) AS Dept (deptnum. Answer: A. UPDATE t1 SET b = b + 1 WHERE b = 1. 3 C. Global Temporary Answer: A. The second INSERT fails because it would create a duplicate primary index value. b INTEGER) PRIMARY INDEX (a). C. B. INSERT INTO t1 VALUES (1. Answer: D Question: 12 Which four statements are true about the following MERGE INTO statement? (Choose four.) MERGE INTO department USING VALUES (105. E. The ON clause must contain the primary index of the target table. Dept.budget. C. The primary index of the target table must be unique. SAMPLEID FROM stores SAMPLE WITH REPLACEMENT WHEN state = 'WI' THEN 4 ELSE 3 END ORDER BY 3. assuming 10 rows from every state in the stores table? A. Dept. Permanent D.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 A. The INSERTs succeed but the UPDATE fails because it would create a duplicate row. It can include a self join. The INSERTs and the UPDATE succeed. The AS clause specifies the name of the source table. 'Sales Dept'. Answer: A. Dept. 4 D. D. It must include a WHERE clause.deptname. Which statement is true? A.deptnum = department. It cannot include a subquery. A. 2 B. D Question: 14 Consider the following SQL statement: SELECT city. Volatile B. D.deptnum. budget. The INSERTs succeed but the UPDATE fails because the syntax is incorrect.com . E Question: 13 What are two characteristics of UPDATE ? (Choose two . INSERT INTO t1 VALUES (1. 7 Page 3 of 27 © SelfExamEngine. B Question: 11 Consider the following set of SQL statements: CREATE SET TABLE t1 (a INTEGER. manager) ON Dept. B.1). Derived C.2). It can be performed on a single table view. C. D. D. C. B. The operation performed is an Upsert on the department table.department_number WHEN MATCHED THEN UPDATE SET budget_amount = Dept.) A. deptname. 770000. state.budget WHEN NOT MATCHED THEN INSERT VALUES (Dept.

cust_addr. D.35. C. job_code B. Answer: A. SAMPLEID FROM customer_table SAMPLE WHEN state = 'CA' THEN . B. D. Which results do you get from this SQL statement? A. A. An implicit join is a sequence of table references enclosed in parentheses. E. Answer: C Question: 17 Consider the SQL statement: SELECT employee_number. The query results in an error because the sample percentages add to greater than 1. a list of employee salaries with a grand total of all salaries Answer: D Question: 18 Which three statements are true? (Choose three. F. .F Question: 19 Which two are correct uses of table aliasing to avoid Cartesian product joins? (Choose two.20 ELSE . is specified in the WHERE clause.) A. salary_amount FROM personnel WITH SUM(salary_amount) ORDER BY department_number. assuming there are 10 rows from every state in customer_table ? A.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Answer: A Question: 15 Considering the following SQL statement: SELECT cust_name. .25.com . C . just a total of all salaries C. dept_num and job_code D. A cross join requires a WHERE clause. How many distinct SAMPLEID values would be found in the answer set. total salaries for each department B. a list of employee salaries with totals by department D. the join condition. An ON clause cannot be specified for a cross join. department_number. dept_num C. It does not apply to either column as the query needs parentheses. C. For an implicit join. B. A WHERE clause cannot be specified with a cross join.25. An outer join requires an ON clause. if any. Answer: C Question: 16 Which column(s) does DISTINCT apply to in the following query? SELECT DISTINCT dept_num. no details. job_code FROM employee.) Page 4 of 27 © SelfExamEngine. 1 2 4 None are found.

the ANY clause C.acct1 = A2.) A.acct1 = table_a.acct2 B. 5. 2300 D. table_a. B Question: 20 Exhibit: Given the two tables and the query shown in the exhibit. SEL A1. 2. table_a A2 WHERE A1. the WHERE clause Answer: A. table_a A2 WHERE A1. the ON clause B. D Question: 22 Page 5 of 27 © SelfExamEngine.acct2 Answer: A.acct1 = A2.c1. table_a WHERE A1. NULL C. SEL * FROM table_a A1.acct2 D. SEL * FROM table_a A1. table_a A2 WHERE A1. NULL E.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 A.com .acct1 = table_a. SEL * FROM table_a A1.acct2 C. 3. 2.c2 FROM table_a A1. 2. 20000 Answer: B Question: 21 Where can the join condition for an inner join be specified? (Choose two. what is the result set? A. the FROM clause D. NULL B.

Fisher E. index. the number of sessions running for the user Answer: B Question: 25 Which information does HELP TABLE &lt. data type. NULL D. the SQLFLAG value for the user B. Adams Answer: D Question: 24 Which result do you get from the SELECT SESSION statement ? A. column name. all rows from the table listed before the JOIN command and the unmatched rows from the other table D. what is the result set? A. and comment C. the session number for the user C. provide about the specified table? A. Miller C. and comment Page 6 of 27 © SelfExamEngine. table id. the session transaction mode for the user D. data type. and the unmatched rows from the second table listed in the JOIN clause Answer: B Question: 23 Exhibit: Given the table and the query shown in the exhibit.tablename&gt. all matched data from both tables. Smith B. all unmatched data from both tables. data type. all matched data from both tables. and comment B. with the matched data eliminated B.com . column name. combined with all unmatched data from both tables C.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 The FULL OUTER JOIN command is designed to produce which type of results? A. column name.

and comment Answer: A Question: 26 Consider this request in Teradata mode: DELETE t1. HAVING F. D Question: 28 You have an EMPLOYEE table with columns name. if any. and HAVING clauses. dept. WHERE. Answer: A Question: 29 When processing a SELECT statement that includes WHERE . GROUP BY. COMMIT.dept GROUP BY dep) = salary.) A.min_dept AND salary = a. dept. D.com . salary FROM EMPLOYEE e WHERE salary = (SELECT MIN(salary) FROM EMPLOYEE f GROUP BY dept) AND e. salary . GROUP BY Answer: B Page 7 of 27 © SelfExamEngine. SELECT name. HAVING. HAVING C. WHERE. dept. GROUP BY.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 D. DELETE FROM t1. details of which indexes. salary FROM EMPLOYEE . WHERE D. GROUP BY B. B. C. what statistics should be collected on a column C.dept. GROUP BY. SELECT name. HAVING. DROP TABLE t1. DELETE FROM t1. accurate time measurements for query processing D. WHERE. constraint. column name. dept. which steps may be processed in parallel B. dept.dept = e. data type.(SELECT dept as min_dept. salary FROM EMPLOYEE GROUP BY dept HAVING salary = MIN(salary) . D. Which request performs equivalently in ANSI mode? A.dept = f. GROUP BY. will be used to process the query E. MIN(salary) as min_sal FROM EMPLOYEE GROUP BY 1) a WHERE dept = a. recommendations to improve the query based on timing and sizing Answer: A. WHERE. WHERE E. SELECT name. GROUP BY. HAVING. HAVING. what is the order of evaluation during execution? A. Answer: D Question: 27 What does the EXPLAIN output provide to assist the user in query analysis? (Choose two. salary FROM EMPLOYEE e HAVING (SEL MIN(salary) FROM EMPLOYEE f WHERE f. C. Which statement produces a report of employees with the lowest salary in their department? A. SELECT name.min_sal . DELETE FROM t1 ALL. B.

where t1 is an empty table. 500. 250. 100. 200. 45 GROUP BY colA HAVING SUM(colX) = 20. Error D. CHARPOS D.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Question: 30 Given the query SELECT AVG(column1) FROM t1. 300. EXCEPT D. C. No record found Answer: B Question: 31 Consider the following SQL statement: SELECT colA. Which statement is true ? A.com . 275. 300. INDEX C. The query fails because of the WHERE clause. 400. 275. 400. 400. 100. 200. 500). 250. INTERSECT Answer: C Question: 33 Table_1 has only one column and contains these values (100. 275. A. 400 C. 200. POS B. 300. 300. Table_2 has only one column and contains these values (100. If you use the EXCEPT operator between these tables. B. 200. 100. 300. SUBTRACT E. 250. Null C. what would the result set contain? A. 250. colB. The query succeeds. The query fails because of the HAVING clause. what is the result? A. 500 F. 500). where Table_1 is the first table. 275. D. Answer: D Question: 32 The MINUS operator is equivalent to _____. 500 D. 400 E. 0 B. The query fails because of the GROUP BY clause. 250. SUM(colX) FROM table1 WHERE colA &gt. 500 Answer: B Question: 34 Which Teradata SQL function determines the position where a substring begins within a string? A. 200. 200. 100. NOT IN C. 275 B. SUBINDEX Page 8 of 27 © SelfExamEngine. LESS B.

------. SUBSTRING Answer: B Question: 35 Which formatting string applied to a timestamp will produce the following output? Monday. It sorts after negative values and after blank character values. B. 9235 50. 9135 50. c1 c2 ----------.9135 50. 9135 60. 9235 50.9135 60. 9135 50.com. 9235 60.------. 9235 50. c1 c2 ----------. It sorts before negative values and before blank character values. B. B. It sorts before negative values and after blank character values.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 E.BM2BD2. FORMAT ' E3.BM4BD2.Y4BHH:MI:SSBZ ' B. c1 c2 ----------. ----------. c1 c2 ----------. FORMAT ' E4. FORMAT ' E4. 9235 50.------. SELECT DISTINCT(TITLE(employee#)) FROM Employee. Which answer set is returned with the following SELECT statement ? SELECT * FROM tmp_tbl WHERE c1 = 9135 OR c1 = 9235 AND c2 &lt.com . C. C. c1 c2 ----------.------. C. 9135 50.------. 9235 50.Y4BHH:MI:SSBT ' C. 9135 50. Your trainee Company is curious in the proper order of Page 9 of 27 © SelfExamEngine. A. November 04. c1 c2 ----------. 9235 60.------.Y4BHH:MI:SSBZ ' D.9135 60. Answer: B Question: 37 Table tmp_tbl contains following four rows: c1 c2 ----------. SELECT DISTINCT TITLE(employee#) FROM Employee. 9235 60.Y4BHH:MI:SSBT ' Answer: C Question: 36 Which statement returned the following answer set? TITLE(employee_number) ---------------------employee# A. 9135 50. D. 9235 50. 9135 60. 9235 60. SELECT DISTINCT TITLE(employee_number) FROM Employee.BM2BD2. FORMAT ' E3.------. 9235 60.9135 60. F.9135 50. SELECT TITLE(employee#) FROM Employee.9135 60. 9235 60. E. 9135 50. D. 9235 60.9135 60. Answer: A Question: 38 How does a null sort during an ascending sort? A. 51.00 ORDER BY 1. 9235 50. It sorts after negative values and before blank character values. 9235 60. 9235 50. 9135 50. Answer: D Question: 39 DRAG DROP You work as a DBA at Company.2002 03:24:22 +00:00 A.------.BM4BD2.9135 50. D. 9235 50.

$ and % C. You need to place each step in its proper order. & and % D. _ and $ B.com . Answer: Explanation: s Question: 40 Which two symbols serve as wildcards in the string expression of the LIKE operator ? A.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Evaluation precedence. _ and % Page 10 of 27 © SelfExamEngine. She asks you to explain.

what is signified by the syntax element UNBOUNDED PRECEDING ? A. the one row prior to the current row B. CAST can be used to convert a byte data type to another data type. the entire partition before and after the current row Answer: B Question: 44 Within a window. CAST can be used to convert a non-byte data type to another non-byte data type.= y) AND (x &lt. ( (x &gt. z)) D. D. ORDER BY C.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Answer: D Question: 41 Which logical comparison is equivalent to " x BETWEEN y AND z" ? A. NULL ONLY E. IS NOT NULL Answer: B. the number of rows before the current row D. ((x &gt. = NULL B. which SQL command determines the group or groups over which an ordered Analytical function executes? A. the entire partition before the current row C. ROWS B. PARTITION BY Answer: D Question: 45 Which two statements are true? (Choose two.= z)) C. ((x &gt.) A. D Page 11 of 27 © SelfExamEngine. z)) B.= y) AND (x &lt. C.com .) A. Answer: A. GROUP BY D. Conversion of numeric to integer truncates any decimal portion. Conversion of numeric to integer rounds up any decimal portion. y) AND (x &lt.null data? (Choose two. IS NULL C. NULL D. B. ((x &gt. &lt. &gt. y) AND (x &lt.=z)) Answer: D Question: 42 Which two expressions are used to distinguish null data from n on. E Question: 43 Within ordered analytic functions.

1**2 gives 4. Answer: C Question: 50 Which two can be specified in the CREATE TABLE statement? (Choose two. t2 WHERE q1=r2) WITH DATA. CREATE TABLE t19 AS (SELECT a1. -2.1 E. C. '123' F. 'bb1' C.com . t2 WHERE q1=r2) WITH DATA. Error: Bad argument for SQRT function Answer: E Question: 47 What is the result of the following query? SELECT ADD_MONTHS (CURRENT_DATE.) A. A. data block size C.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Question: 46 2. the current date plus 10 years B. join index B.1 B. c2 FROM t1. 1 B. B. D. the current date plus 40 months. maximum permanent space Answer: B. three days Answer: A Question: 48 What is the result of SELECT CAST('bb12345' AS CHAR(3)) in Teradata mode? (Note: b = blank) A. CREATE TABLE t19 LIKE (SELECT a1. CREATE TABLE 19 AS (SELECT a1. the current date plus 120 days C. CREATE TABLE t19 AS (SELECT a1. c2 FROM t1. 40*3).41) ? A.41. 123 D. What is the result of SELECT SQRT(-4. -2 C. '345' Answer: B Question: 49 Which statement creates a table that is initialized with the result of a query? A. t2 WHERE q1=r2) WITH RESULTS. c2 FROM t1. c2 FROM t1. t2 WHERE q1=r2). the current date plus 120 years D. 345 E. 2 D. before and after journaling D. C Question: 51 Page 12 of 27 © SelfExamEngine. 2.

A. A TIMESTAMP minus an INTERVAL results in an INTERVAL . C. Any Boolean comparison operator can be used. Page 13 of 27 © SelfExamEngine. E.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 What are two characteristics of the CHECK constraint? (Choose two. D. A TIMESTAMP minus a TIMESTAMP results in an INTERVAL . The built-in functions DATE and CURRENT_DATE are equivalent. D. CURRENT_DATE is a data type as well as a built-in function.767. An INTERVAL times a number results in a number. DATE values are stored internally as integers. INTERVAL MONTH Answer: B Question: 55 Which statement about data types is correct? A. D.com .DATE '200301-15'. Answer: A. DATE B. D. A column on another table can be checked at the table level. Has a minimum value of -32. C Question: 53 Which three statements about dates are true? (Choose three. A TIMESTAMP minus a TIMESTAMP results in a TIMESTAMP . It is synonymous with REAL and DOUBLE PRECISION . DATE is a data type as well as a built-in function. B. Answer: C Question: 56 What 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)). C. The internal length is 4 bytes.CALENDAR . Multiple columns can be checked at the table level. It will not work on the primary index column.) A. B. B. The internal length is 8 bytes. C Question: 52 What are two characteristics of the FLOAT data type? (Choose two. C. E Question: 54 What data type results from the following calculation? SELECT DATE '2003-02-15' . B. INTEGER C. INTERVAL DAY D.) A.) A. Answer: B. CURRENT_DATE is a column in SYS_CALENDAR. B.768 and maximum value of 32. Answer: B. C.

y) Answer: B Question: 58 Which statement has correct syntax? A. y) B. the fraction of the shipping cost attributed to part number 1 C. A. SELECT CASE WHEN table_city. the total shipping cost attributed to all parts delivered B. 55 Answer: E Question: 57 What is another way to write the following expression? CASE WHEN x IS NOT NULL THEN x WHEN y IS NOT NULL THEN y ELSE NULL END A.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 A. COALESCE (x. an error since you cannot place a CASE statement within a SUM statement D. B. D. 47 E. 11 B. C. y) D. SELECT CASE WHEN x=1 THEN 'Yes' ELSE 'No' END FROM Table_A. SELECT CASE IF x=1 THEN 'Yes' ELSE NULL END FROM Table_A. 30 D.city FROM u) THEN 'Y' ELSE 'N' END FROM table_city. CASE WHEN city = 'Boston' THEN 'Y' ELSE 'N' END FROM table_city. SELECT CASE WHEN 'Boston' THEN 'Y' ELSE 'N' END FROM table_city. the total shipping cost attributed to part number 1 and the total shipping cost of all parts Answer: B Question: 61 Exhibit: Page 14 of 27 © SelfExamEngine. B. Answer: B Question: 59 Which SQL statement is a syntactically correct example of a Searched CASE expression? A. NULLIF (x. 22 C. COMPRESS NULL (x.city IN (SELECT u. ZEROIFNULL (x. SELECT CASE SEARCH x FOR 1 IF = THEN 'Yes' ELSE 'No' FROM Table_A. SELECT CASE x WHEN 1 THEN 'Yes' ELSE 'No' END FROM Table_A. y) C. D. SELECT city. Answer: C Question: 60 What is the expected result of the following SQL statement? SELECT SUM(CASE part_no WHEN '1' THEN ship_amt ELSE 0 END) / SUM(ship_amt) FROM Table_T.com . C. SELECT CASE WHEN city = 'Boston' THEN city = 'Y' ELSE 'N' END FROM table_city.

when joining more than two tables Answer: B Question: 63 What is the join type in the following query? SELECT workers. workers.deptno. Cartesian join Page 15 of 27 © SelfExamEngine. managers. when joining a table to itself C. nested join D.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Given the two tables and the query shown in the exhibit.deptno = workers. managers. 4 D.name. self join B. workers. 3 C.com . 6 Answer: C Question: 62 When is a table alias required? A. to enhance join processing B. when processing subqueries D.deptno.yrsexp FROM employee workers. A.yrsexp. cross join C. employee managers WHERE managers. how many rows does the result set have? A. 2 B.name. 5 E.

t2.b3.com . C. e.dept_no = d. E. Answer: A.name FROM department d INNER JOIN employee e ON e.a1=t3. D.b1=t3. t3 ON t1.a2 AND t2=b2=t3.name.) A. D Question: 65 Consider the following query: SELECT d.b1=t3. The privilege to create the macro can be restricted to specified developers.t1=t2. It returns information about employees who have no department number. Page 16 of 27 © SelfExamEngine. SELECT * FROM t1 INNER JOIN (t2.b2=t3.job_code = j. SELECT * FROM t1 JOIN t2.) A. B. D. all employees B.name FROM department d RIGHT OUTER JOIN employee e ON d. It returns an output row for each successful match between employee and department. Answer: D Question: 66 Con sider the following: SELECT e.) A. SELECT * FROM t1 INNER JOIN t2 ON t1. C. to have a simple way to create multiple tables in the same macro consistently Answer: B. D.b3. employees with invalid departments Answer: A. SELECT * FROM t1. to have a simple way to execute a fixed series of SQL statements D. B. The ON clause can be replaced with a WHERE clause to produce the same results.a2. C Question: 68 What are three security reasons for using a macro? (Choose three. E Question: 67 What are two reasons to use macros? (Choose two.b3.a1=t2.b3. t3 ON t1.b3. employees without departments E. It returns information about departments that have no employees assigned to them. It limits the need to grant privileges on tables and views used in the macro.dept_no = e.a1=.a1=t2. t3) ON t1.dept_no. Which is true? A. to have a query automatically ask for input values B.a1=t2. t3 WHERE t1.a2 WHERE t1. A parameterized macro can be designed to use the parameter to control the table or view to access in the macro.) A. jobs without employees C. SELECT * FROM t1. B. d. to have the ability to pass parameter(s) to a query C.a2 AND t1.a2 AND t2.dept_no LEFT OUTER JOIN job j ON e.dept_no. C. t2. t3 WHERE t1.job_code.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Answer: A Question: 64 Which two statements have valid syntax and include an implicit join? (Choose two. departments with no employees D. t2. What could the result set contain? (Choose three.

GROUP BY E. CREATE MACRO abc (x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHERE Emp_No = :x. and OR ? A. AND B.) A. AND. NOT. OR D.). B . 63 with a warning message Answer: B Question: 73 Which two symbols serve as wildcards in the string expression of the LIKE operator ? Page 17 of 27 © SelfExamEngine. E Question: 70 What is the correct syntax for creating a parameterized macro. null D. D. ORDER BY D. NOT C.). OR Answer: C Question: 72 What does COUNT(*) return. LEFT OUTER JOIN Answer: B.). OR. C. B. 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. HAVING C. D. CREATE MACRO abc (INTEGER x) AS (SELECT Emp_Name FROM Table_1 WHERE Emp_No = :x. including the use of that parameter within the macro? A.). 63 B.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 D. 100 C. UPDATE B. AND. NOT. CREATE MACRO abc (:x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHERE Emp_No = x. AND.com . NOT. OR. NOT. Answer: C Question: 71 What is the default order of precedence of the logical operators AND.D Question: 69 Which three are allowed within a view definition? (Choose three. Answer: A. CREATE MACRO abc (x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHERE Emp_No = x. if a single column table contains 100 rows with 37 of them being null ? A.

90000 AND SALARY &gt. & and % D. Gorm. A TIMESTAMP minus a TIMESTAMP results in an INTERVAL . Bob. Bob. A TIMESTAMP minus a TIMESTAMP results in a TIMESTAMP . 90000 AND SALARY &gt. C. E Question: 76 Consider the following data for column name where the column is non-case specific: Alison Dawn Susan 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'. Dawn.EMPLOYEE A.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 A. Paul D. 40000) B. IS NOT NULL Answer: B. 40000) Answer: D Question: 75 Which two expressions are used to distinguish null data from n on. D. _ and % Answer: D Question: 74 Which WHERE statement never returns any rows? SELECT EMPNO. $ and % C. WHERE (DEPTNO = 2080 OR DEPTNO = 2200) AND (SALARY &lt. Bob. 40000) C. = NULL B. Alison. Geoff C. NULL D. _ and $ B. SALARY FROM RETAIL. IS NULL C. &gt. DEPTNO. Bob. NULL ONLY E. 40000) D. WHERE (DEPTNO = 2080 OR DEPTNO = 2200) OR (SALARY &lt. 90000 AND SALARY &gt.com . WHERE (DEPTNO = 2080 AND DEPTNO = 2200) AND (SALARY &lt. Geoff. Alison. A. &lt. 90000 OR SALARY &gt. WHERE (DEPTNO = 2080 OR DEPTNO = 2200) AND (SALARY &lt. Geoff. A TIMESTAMP minus an INTERVAL results in an INTERVAL . B.) A. Dawn. Geoff. Gorm Answer: B Question: 77 Which statement about data types is correct? A.null data? (Choose two. Answer: C Page 18 of 27 © SelfExamEngine. Dawn. Gorm B. An INTERVAL times a number results in a number. Dawn.

CURRENT_DATE is a data type as well as a built-in function. E Question: 80 What data type results from the following calculation? SELECT DATE '2003-02-15' . 4 WHEN state = 'MI' THEN 5. DATE B. C. B. D Question: 82 Considering the following SQL statement: SELECT state. 5 D. INTERVAL DAY D. SAMPLEID FROM stores SAMPLE WITH REPLACEMENT WHEN state = 'CA' THEN 2. 30 D. SELECT C. 22 C. 55 Answer: E Question: 79 Which three statements about dates are true? (Choose three. 7 ELSE 50 ORDER BY 2. D. DATE values are stored internally as integers. B.com . 47 E.) A. 68 Page 19 of 27 © SelfExamEngine. INTERVAL MONTH Answer: B Question: 81 SAMPLEID expressions can appear with the SAMPLE command in which two SQL clauses? (Choose two. A. 11 B.CALENDAR . WHERE B. A. E.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Question: 78 What 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)). ORDER BY Answer: B. INTEGER C.) A. GROUP BY D. Answer: A. assuming 10 rows from every state in the stores table? A.DATE '200301-15'. CURRENT_DATE is a column in SYS_CALENDAR. The built-in functions DATE and CURRENT_DATE are equivalent. 2 B. How many distinct SAMPLEID values will appear in the answer set. 4 C. DATE is a data type as well as a built-in function.

(SELECT AVG (em. It uses a correlated subquery with aggregate. 1 B. Answer: B Question: 84 Which three statements about subqueries are true? (Choose three. 3 Page 20 of 27 © SelfExamEngine. 2 C. A. SELECT DISTINCT TITLE(employee#) FROM Employee. avgsal ORDER BY salary DESC. C. They can be the object of an IN or NOT IN .salary_amount) FROM employee em WHERE em. A. Answer: B Question: 87 What is the result of the following query? SELECT INDEX (SUBSTRING ('DONNA KRAUS' FROM 6 FOR 5). B. SELECT DISTINCT(TITLE(employee#)) FROM Employee. employee WHERE salary &gt.department_number = ee. B.salary_amount &gt. It is not valid. SELECT DISTINCT TITLE(employee_number) FROM Employee. D Question: 85 What is the result of the following query? SELECT last_name FROM employee ee WHERE ee. It uses a derived table with aggregate. D. SELECT TITLE(employee#) FROM Employee. It uses a nested subquery with aggregate. all employees whose salaries are greater than the average salary B. A. They can use ORDER BY . B. salary.com . C. C. They can be nested. C. 'RAU'). all employees whose salaries are greater than the average of the average department salary D. D. They generate a distinct list of values. all employees whose salaries are greater than their departments' average salaries C.) A. Answer: A.department_number). one employee per department whose salary is greater than the department's average salary Answer: B Question: 86 Which statement returned the following answer set? TITLE(employee_number) ---------------------employee# A.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Answer: C Question: 83 What is the best description of this SQL statement? SELECT name. D. avgsal FROM (SELECT AVG(salary) FROM employee) emp_temp (avgsal) .

A.com . the number of rows before the current row D. UNION C.BM4BD2. the entire partition before the current row C. IN () B. FORMAT ' E3. EXCEPT D.BM4BD2. all rows from table_a and table_b. MINUS B. INTERSECT Answer: B Question: 91 While using ordered analytic functions.Y4BHH:MI:SSBT ' D. 4 Answer: C Question: 88 Which formatting string applied to a timestamp will produce the following output? Monday.Y4BHH:MI:SSBZ ' B. with duplicate rows eliminated D. OVER () C.Y4BHH:MI:SSBZ ' C. with output formatted by table_b Answer: C Question: 90 Which set operator could be used to perform the equivalent of an outer join? A. what is signified by the syntax element UNBOUNDED PRECEDING ? A. the one row prior to the current row B.2002 03:24:22 PM A.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 D.Y4BHH:MI:SSBT ' Answer: D Question: 89 Which rows will this UNION operation return to the user? SELECT col_1 FROM table_a UNION SELECT col_6 FROM table_b. FORMAT ' E4. all rows from table_a and table_b. all rows in table_a that have matching rows in table_b B. which SQL command specifies the window or subset of data? A. WINDOW () D. all rows from table_a and table_b. including duplicate rows C. FORMAT ' E3. GROUP BY () Answer: B Question: 92 Within ordered analytic functions.BM2BD2. November 04. the entire partition before and after the current row Page 21 of 27 © SelfExamEngine. FORMAT ' E4.BM2BD2.

C. data block size C. C. C Question: 94 What are two characteristics of COMPRESS ? (Choose two. t2 WHERE q1=r2). D.0)) = SUM(a+b) C. t2 WHERE q1=r2) WITH DATA. CREATE TABLE t19 AS (SELECT a1.0))+SUM(COALESCE(b.0)) D. A column on another table can be checked at the table level. It will compress repeating 1s and 0s. It supports multiple values per column. c2 FROM t1. B.0)+COALESCE(b.com .0)) Answer: D Question: 98 Which SQL clauses always perform the same type of operations? Page 22 of 27 © SelfExamEngine. B. Answer: B. SUM(a)+SUM(b) = SUM(a+b) B. Multiple columns can be checked at the table level. CREATE TABLE t19 LIKE (SELECT a1. maximum permanent space Answer: B. join index B.) A. B. t2 WHERE q1=r2) WITH DATA. D Question: 95 Which statement creates a table that is initialized with the result of a query? A. SUM(COALESCE(a. Answer: B. C Question: 97 Which condition is always true? A. SUM(COALESCE(a. c2 FROM t1. D.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Answer: B Question: 93 What are two characteristics of the CHECK constraint? (Choose two.) A.) A. Answer: C Question: 96 Which two can be specified in the CREATE TABLE statement? (Choose two.0)+COALESCE(b. c2 FROM t1. C. c2 FROM t1. It can be defined so a specific value is not stored in each row. t2 WHERE q1=r2) WITH RESULTS. CREATE TABLE 19 AS (SELECT a1.0))+SUM(COALESCE(b.0)) = SUM(COALESCE(a. before and after journaling D. CREATE TABLE t19 AS (SELECT a1. Any Boolean comparison operator can be used. It will not work on the primary index column. D. SUM(a)+SUM(b) = SUM(COALESCE(a. It can be used on character data types only.

) A. C. SEL SUM(salary) FROM EMPLOYEE HAVING salary &gt. transaction protocol behavior Answer: A.com . rounding behavior C. D Question: 102 Which command will display the account you are currently using? A. (SEL AVG(salary) FROM EMPLOYEE). case sensitivity defaults D. B. Teradata mode affects which three items? (Choose three. SEL SUM(salary) FROM EMPLOYEE HAVING salary &gt. 1 B. SELECT 'ACCOUNT'. salary . HELP USER. EXPLAIN ACCOUNT.) A. data conversions B. avg_sal. SEL SUM(salary) FROM EMPLOYEE e WHERE salary &gt. (SEL AVG(salary) FROM EMPLOYEE). Answer: A. Page 23 of 27 © SelfExamEngine. HELP SESSION. 3 D. HAVING and GROUP BY D. D. HELP ACCOUNT.(SEL AVG(salary) as avg_sal FROM EMPLOYEE ) e WHERE salary &gt. D Question: 100 Employee_ID Name Salary Dept_No 1 Miller 10 2 2 Miller 20 2 3 Hurd 40 3 4 Stevens 10 2 SELECT COUNT(*) FROM employee GROUP BY name. 1. DISTINCT and QUALIFY C.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 A. Which two SQL statements produce a total salary. dept_no HAVING COUNT(*) &gt. 2 C. B. SEL SUM(salary) FROM EMPLOYEE . QUALIFY and HAVING B. how many rows are in the result set? A. 80 Answer: A Question: 101 The choice of ANSI vs.(SEL AVG(salary) as avg_sal FROM EMPLOYEE HAVING salary &gt. 30 E. C. avg_sal) e. SEL SUM(avg_sal) FROM EMPLOYEE . C. E. for only employees having salary greater than the average salary? (Choose two. D. Given the table and the query shown above. HAVING and DISTINCT Answer: A Question: 99 You have an EMPLOYEE table with columns name. AVG(salary). E.

B. what statistics should be collected on a column C. C.) A. which steps may be processed in parallel B. details of which indexes. Referential Constraints Answer: B Question: 106 What type of table is recommended when users need to share a table definition but not share the data? A. It must be coded between quotes. Collect Statistics C. D. Permanent D. C.com . Global Temporary table definitions are maintained in the Data Dictionary. D. Volatile B. Identity Column B. Value is provided by the parser. if any. Derived C. It cannot be used in a macro. C Question: 104 What does the EXPLAIN output provide to assist the user in query analysis? (Choose two. recommendations to improve the query based on timing and sizing Answer: A. B. will be used to process the query E. Volatile Temporary tables must be created before they can be materialized.) A. Volatile Temporary table space requirements are charged against the user's allocation of temporary space. Volatile Temporary tables are materialized in spool space and their definition is maintained in cache. Page 24 of 27 © SelfExamEngine. accurate time measurements for query processing D.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Answer: B Question: 103 Which two statements about the ACCOUNT function are true? (Choose two. Global Temporary Answer: D Question: 107 Which three statements are true about Global and Volatile Temporary tables? (Choose three. Answer: A. D Question: 105 Which option is available with Global Temporary tables? A. Permanent Journaling D.) A. It has no arguments.

2). Name with '?' B. y) C. Which statement is true? Page 25 of 27 © SelfExamEngine. Answer: C Question: 110 What is another way to write the following expression? CASE WHEN x = y THEN NULL ELSE x END A. A. INSERT INTO t1 VALUES (1. ZEROIFNULL (x. B. SELECT CASE x WHEN 1 THEN 'Yes' ELSE 'No' END FROM Table_A. which statement is true assuming that there are no rows in Table_T where x is null? SELECT COUNT(*) FROM Table_T WHERE x = CASE WHEN y=2 THEN 1 END . COALESCE (HomePhone. b INTEGER) PRIMARY INDEX (a). y) Answer: A Question: 111 Consider the expression: SELECT Name. what is returned? A. C. UPDATE t1 SET b = b + 1 WHERE a = 1. D. The SQL statement is not syntactically correct because a CASE statement cannot be used within a WHERE clause. SELECT CASE SEARCH x FOR 1 IF = THEN 'Yes' ELSE 'No' FROM Table_A. y) D. INSERT INTO t1 VALUES (1. The SQL statement is syntactically correct and a count of the number of rows from Table_T where either y=2 or x=1 will be returned. COALESCE (x. MessageService) FROM PhoneDir.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 Answer: A. The SQL statement is syntactically correct and a count of the number of rows from Table_T where y=2 and x=1 will be returned. The SQL statement is not syntactically correct because no ELSE statement exists within the CASE statement. y) B.com .1). C Question: 108 Which SQL statement is a syntactically correct example of a valued CASE expression? A. Name with OfficePhone D. a n e rror m essage C. Name with OfficePhone and MessageService Answer: C Question: 112 Consider the following set of SQL statements: CREATE MULTISET TABLE t1 (a INTEGER. COMPRESS NULL (x. C. SELECT CASE IF x=1 THEN 'Yes' ELSE NULL END FROM Table_A. OfficePhone. B. Answer: B Question: 109 Considering the following SQL. NULLIF (x. If only the HomePhone is NULL . D. B. SELECT CASE WHEN x=1 THEN 'Yes' ELSE 'No' END FROM Table_A.

The INSERTs succeed but the UPDATE fails because it would create a duplicate row. the years since birth E.) A. C.budget.deptname. D.deptname WHEN NOT MATCHED THEN INSERT VALUES (Dept. B.) CREATE MACRO dept_budget (deptno INT.deptnum = department. The USING subquery may return at most a single row. Under which three conditions will the query succeed? (Choose three. E. deptname. Dept. The primary index of the target table must be unique. ColA is defined as CHAR(2) and ColB is defined as VARCHAR(2) . B.). budgamt DEC(10. If zero rows are returned by the subquery. the days since birth D. The INSERTs and the UPDATE succeed. budget) ON Dept. neither the update nor the insert occurs. C. The INSERTs succeed but the UPDATE fails because the syntax is incorrect. D Question: 114 Which four statements are true about executing the following macro? (Choose four. dept_name.6 Page 26 of 27 © SelfExamEngine.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 A. 100001 C. 100000. the months since birth Answer: C Question: 116 What is the result of SELECT CAST(100000. E Question: 115 What is the result of the following query where birthdate has the DATE data type ? SELECT (C URRENT_ DATE . C. ColA is defined as INTEGER and ColB is defined as DATE . D. A.budget.department_number WHEN MATCHED THEN UPDATE SET budget_amount = Dept. ColA is defined as TIMESTAMP and ColB is defined as DATE . The AS clause within the macro specifies the name of the source table. NULL). Answer: A Question: 113 Consider the following statement: UPDATE T1 SET ColA = ColB WHERE ColB IS NOT NULL. the day of birth B. D. Answer: B.deptnum. 100000 B. ColA is defined as INTEGER and ColB is defined as SMALLINT . Dept. D. A. the month of birth C. :budgamt FROM dept_name_assignment WHERE departme nt_number = :deptno) AS Dept(deptnum. C.com . B. The ON clause must contain the primary index of the target table.birthdate ) FROM birthrecord.6 AS SMALLINT) ? A. The second INSERT fails because it would create a duplicate primary index value. C.2))AS (MERGE INTO department USING (SELECT :deptno. department_name = Dept. Answer: A.

When an integer value is added to a float value. weight FROM participants WITH SUM(weight) BY lot WITH AVG(weight). the float is first converted to an integer. job_code FROM employee. SUM(weight) ORDER BY name.75 C. . B. a list of all participants with average weight and subtotal of weight for each lot and a total weight for all lots D. When an integer value is added to a float value. dept_num C. so must first use the CAST function to make them the same. A. Answer: D Question: 117 Which statement is true? A. It does not apply to either column as the query needs parentheses. lot. dept_num and job_code D. lot. 75 D. 75. a list of all participants with a subtotal of weight for each lot and both the average and total weight for all lots Answer: D Question: 120 Which column(s) does DISTINCT apply to in the following query? SELECT DISTINCT dept_num.com .00 ? A. You cannot add different data types. .00 B. Error: Numeric overflow occurred during computation. job_code B. Answer: C Page 27 of 27 © SelfExamEngine. C. grand total and average weight for all lots B. a list of all participants with average weight for each lot and both the average and total weight for all lots C. Answer: B Question: 118 What is the displayed result of SELECT 3 / 4 * 100. D. a list of all participants with their total weight and a subtotal. the integer is first converted to a float. neither is converted. Which answer set is returned from this SQL statement? A.Exam Name: Exam Type Exam Code: Teradata SQL v2r5 Teradata NR0-013 Total Questions: 120 D.00 Answer: A Question: 119 Consider the SQL statement: SELECT name. When an integer value is added to a float value.