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
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
A. Volatile
B. Derived
C. Permanent
D. Global Temporary
Answer: A, B
Question: 11
Consider the following set of SQL statements: CREATE SET TABLE t1 (a INTEGER, b
INTEGER)
PRIMARY INDEX (a); INSERT INTO t1 VALUES (1,1); INSERT INTO t1 VALUES (1,2); UPDATE
t1 SET
b = b + 1 WHERE b = 1; Which statement is true?
A. The INSERTs 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: 12
Which four statements are true about the following MERGE INTO statement? (Choose
four.) MERGE INTO department USING VALUES (105, 'Sales Dept', 770000, 1018) AS Dept
(deptnum, deptname, budget, manager) ON Dept.deptnum = department.department_number
WHEN MATCHED THEN UPDATE SET budget_amount = Dept.budget WHEN NOT MATCHED
THEN 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: 13
What 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: 14
Consider the following SQL statement: SELECT city, state, SAMPLEID FROM stores SAMPLE
WITH REPLACEMENT WHEN state = 'WI' THEN 4 ELSE 3 END ORDER BY 3; How many
distinct SAMPLEID values are created, assuming 10 rows from every state in the stores table?
A. 2
B. 3
C. 4
D. 7
Page 3 of 27
© SelfExamEngine.com
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, cust_addr, SAMPLEID FROM
customer_table SAMPLE WHEN state = 'CA' THEN .25, .20 ELSE .25, .35; How many distinct
SAMPLEID values would be found in the answer set, assuming there are 10 rows from every
state in customer_table ?
A.
B.
C.
D.
1
2
4
None are found. The query results in an error because the sample percentages add to
greater than 1.
Answer: C
Question: 16
Which column(s) does DISTINCT apply to in the following query? SELECT DISTINCT dept_num,
job_code FROM employee;
A. job_code
B. dept_num
C. dept_num and job_code
D. It does not apply to either column as the query needs parentheses.
Answer: C
Question: 17
Consider the SQL statement: SELECT employee_number, department_number, salary_amount
FROM personnel WITH SUM(salary_amount) ORDER BY department_number; Which results do
you get from this SQL statement?
A. total salaries for each department
B. no details, just a total of all salaries
C. a list of employee salaries with totals by department
D. a list of employee salaries with a grand total of all salaries
Answer: D
Question: 18
Which 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: 19
Which two are correct uses of table aliasing to avoid Cartesian product joins? (Choose two.)
Page 4 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
A. SEL * FROM table_a A1, table_a WHERE A1.acct1 = table_a.acct2
B. SEL * FROM table_a A1, table_a A2 WHERE A1.acct1 = A2.acct2
C. SEL * FROM table_a A1, table_a A2 WHERE A1.acct1 = table_a.acct2
D. SEL A1.c1, table_a.c2 FROM table_a A1, table_a A2 WHERE A1.acct1 = A2.acct2
Answer: A, B
Question: 20
Exhibit:
Given the two tables and the query shown in the exhibit, what is the result set?
A. 5, NULL
B. 2, NULL
C. 2, 2300
D. 3, NULL
E. 2, 20000
Answer: B
Question: 21
Where can the join condition for an inner join be specified? (Choose two.)
A. the ON clause
B. the ANY clause
C. the FROM clause
D. the WHERE clause
Answer: A, D
Question: 22
Page 5 of 27
© SelfExamEngine.com
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. all unmatched data from both tables, with the matched data eliminated
B. all matched data from both tables, combined with all unmatched data from both tables
C. all rows from the table listed before the JOIN command and the unmatched rows from the
other table
D. all matched data from both tables, 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, what is the result set?
A. Smith
B. Miller
C. NULL
D. Fisher
E. Adams
Answer: D
Question: 24
Which result do you get from the SELECT SESSION statement ?
A. the SQLFLAG value for the user
B. the session number for the user
C. the session transaction mode for the user
D. the number of sessions running for the user
Answer: B
Question: 25
Which information does HELP TABLE <tablename> provide about the specified table?
A. column name, data type, and comment
B. column name, index, data type, and comment
C. column name, table id, data type, and comment
Page 6 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
D. column name, constraint, data type, and comment
Answer: A
Question: 26
Consider 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: 27
What 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 column
C. accurate time measurements for query processing
D. details of which indexes, if any, will be used to process the query
E. recommendations to improve the query based on timing and sizing
Answer: A, D
Question: 28
You have an EMPLOYEE table with columns name, dept, salary . Which statement produces a
report of employees with the lowest salary in their department?
A. SELECT name, dept, salary FROM EMPLOYEE ,(SELECT dept as min_dept, MIN(salary) as
min_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: 29
When processing a SELECT statement that includes WHERE , GROUP BY, and HAVING
clauses, what is the order of evaluation during execution?
A. WHERE, HAVING, GROUP BY
B. WHERE, GROUP BY, HAVING
C. HAVING, GROUP BY, WHERE
D. GROUP BY, HAVING, WHERE
E. GROUP BY, WHERE, HAVING
F. HAVING, WHERE, GROUP BY
Answer: B
Page 7 of 27
© SelfExamEngine.com
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; where t1 is an empty table, what is the
result?
A. 0
B. Null
C. Error
D. No record found
Answer: B
Question: 31
Consider the following SQL statement: SELECT colA, colB, SUM(colX) FROM table1 WHERE
colA > 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: 32
The MINUS operator is equivalent to _____.
A. LESS
B. NOT IN
C. EXCEPT
D. SUBTRACT
E. INTERSECT
Answer: C
Question: 33
Table_1 has only one column and contains these values (100, 200, 300, 400, 500). Table_2 has
only one column and contains these values (100, 200, 250, 275, 500). If you use the EXCEPT
operator between these tables, where Table_1 is the first table, what would the result set
contain?
A. 250, 275
B. 300, 400
C. 100, 200, 500
D. 250, 275, 300, 400
E. 100, 200, 250, 275, 300, 400, 500
F. 100, 100, 200, 200, 250, 275, 300, 400, 500, 500
Answer: B
Question: 34
Which Teradata SQL function determines the position where a substring begins within a string?
A. POS
B. INDEX
C. CHARPOS
D. SUBINDEX
Page 8 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
E. SUBSTRING
Answer: B
Question: 35
Which formatting string applied to a timestamp will produce the following output? Monday,
November 04,2002
03: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: 36
Which 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: 37
Table tmp_tbl contains following four rows: c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60. 9235
50. Which answer set is returned with the following SELECT statement ? SELECT * FROM
tmp_tbl WHERE c1 = 9135 OR c1 = 9235 AND c2 < 51.00 ORDER BY 1;
A.
B.
C.
D.
E.
F.
c1 c2 ----------- ------- 9135 50. 9135 60. 9235 50.
c1 c2 ----------- ------- 9135 50. 9235 50. 9235 60.
c1 c2 ----------- ------- 9135 50. 9235 50.
c1 c2 ----------- ------- 9135 60. 9135 50.
c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60.
c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60. 9235 50. ----------- ------- 9135 60. 9135 50.
9235 60. 9235
50. 9135 60. 9135 50. 9235 60. 9235 50. 9135 50. 9235 60. 9235 50. 9235 60. 9235 50.
Answer: A
Question: 38
How 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
Question: 39 DRAG DROP
You work as a DBA at Company.com. Your trainee Company is curious in the proper order of
Page 9 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
Evaluation precedence. She asks you to explain. You need to place each step in its proper order.
Answer:
Explanation:
s
Question: 40
Which two symbols serve as wildcards in the string expression of the LIKE operator ?
A. _ and $
B. $ and %
C. & and %
D. _ and %
Page 10 of 27
© SelfExamEngine.com
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. ( (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: 42
Which two expressions are used to distinguish null data from n on- null data? (Choose two.)
A. = NULL
B. IS NULL
C. < > NULL
D. NULL ONLY
E. IS NOT NULL
Answer: B, E
Question: 43
Within ordered analytic functions, what is signified by the syntax element UNBOUNDED
PRECEDING ?
A. the one row prior to the current row
B. the entire partition before the current row
C. the number of rows before the current row
D. the entire partition before and after the current row
Answer: B
Question: 44
Within a window, which SQL command determines the group or groups over which an ordered
Analytical function executes?
A. ROWS
B. ORDER BY
C. GROUP BY
D. PARTITION BY
Answer: D
Question: 45
Which 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 11 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
Question: 46
2.1**2 gives 4.41. What is the result of SELECT SQRT(-4.41) ?
A. -2.1
B. -2
C. 2
D. 2.1
E. Error: Bad argument for SQRT function
Answer: E
Question: 47
What is the result of the following query? SELECT ADD_MONTHS (CURRENT_DATE, 40*3);
A. the current date plus 10 years
B. the current date plus 120 days
C. the current date plus 120 years
D. the current date plus 40 months, three days
Answer: A
Question: 48
What is the result of SELECT CAST('bb12345' AS CHAR(3)) in Teradata mode? (Note: b =
blank)
A. 1
B. 'bb1'
C. 123
D. 345
E. '123'
F. '345'
Answer: B
Question: 49
Which 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 index
B. data block size
C. before and after journaling
D. maximum permanent space
Answer: B, C
Question: 51
Page 12 of 27
© SelfExamEngine.com
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.)
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: 52
What 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: 53
Which 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: 54
What data type results from the following calculation? SELECT DATE '2003-02-15' - DATE '200301-15';
A. DATE
B. INTEGER
C. INTERVAL DAY
D. INTERVAL MONTH
Answer: B
Question: 55
Which 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: 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));
Page 13 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
A. 11
B. 22
C. 30
D. 47
E. 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. NULLIF (x, y)
B. COALESCE (x, y)
C. ZEROIFNULL (x, y)
D. COMPRESS NULL (x, y)
Answer: B
Question: 58
Which statement has correct syntax?
A.
B.
C.
D.
SELECT CASE WHEN 'Boston' THEN 'Y' ELSE 'N' END FROM table_city;
SELECT city, CASE WHEN city = 'Boston' THEN 'Y' ELSE 'N' END FROM table_city;
SELECT CASE WHEN city = 'Boston' THEN city = 'Y' ELSE 'N' END FROM table_city;
SELECT CASE WHEN table_city.city IN (SELECT u.city FROM u) THEN 'Y' ELSE 'N' END
FROM table_city;
Answer: B
Question: 59
Which 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: 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;
A. the total shipping cost attributed to all parts delivered
B. the fraction of the shipping cost attributed to part number 1
C. an error since you cannot place a CASE statement within a SUM statement
D. 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.com
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, how many rows does the result set
have?
A. 2
B. 3
C. 4
D. 5
E. 6
Answer: C
Question: 62
When is a table alias required?
A. to enhance join processing
B. when joining a table to itself
C. when processing subqueries
D. when joining more than two tables
Answer: B
Question: 63
What is the join type in the following query? SELECT workers.name, workers.yrsexp,
workers.deptno, managers.name, managers.yrsexp FROM employee workers, employee
managers WHERE managers.deptno = workers.deptno;
A. self join
B. cross join
C. nested join
D. Cartesian join
Page 15 of 27
© SelfExamEngine.com
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.)
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: 65
Consider the following query: SELECT d.dept_no, d.name, e.name FROM department d INNER
JOIN 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: 66
Con sider the following: SELECT e.name FROM department d RIGHT OUTER JOIN employee e
ON d.dept_no = e.dept_no LEFT OUTER JOIN job j ON e.job_code = j.job_code; What could the
result set contain? (Choose three.)
A. all employees
B. jobs without employees
C. departments with no employees
D. employees without departments
E. employees with invalid departments
Answer: A, D, E
Question: 67
What are two reasons to use macros? (Choose two.)
A. to have a query automatically ask for input values
B. to have the ability to pass parameter(s) to a query
C. to have a simple way to execute a fixed series of SQL statements
D. to have a simple way to create multiple tables in the same macro consistently
Answer: B, C
Question: 68
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.
Page 16 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
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: 69
Which three are allowed within a view definition? (Choose three.)
A. UPDATE
B. HAVING
C. ORDER BY
D. GROUP BY
E. LEFT OUTER JOIN
Answer: B, D, E
Question: 70
What is the correct syntax for creating a parameterized macro, including the use of that
parameter within the macro?
A. CREATE MACRO abc (INTEGER x) AS (SELECT Emp_Name FROM Table_1 WHERE
Emp_No = :x;);
B. CREATE MACRO abc (:x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHERE
Emp_No = x;);
C. CREATE MACRO abc (x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHERE
Emp_No = :x;);
D. CREATE MACRO abc (x INTEGER) AS (SELECT Emp_Name FROM Table_1 WHERE
Emp_No = x;);
Answer: C
Question: 71
What is the default order of precedence of the logical operators AND, NOT, and OR ?
A. NOT, OR, AND
B. AND, OR, NOT
C. NOT, AND, OR
D. AND, NOT, OR
Answer: C
Question: 72
What does COUNT(*) return, if a single column table contains 100 rows with 37 of them being
null ?
A. 63
B. 100
C. null
D. 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.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
A. _ and $
B. $ and %
C. & and %
D. _ and %
Answer: D
Question: 74
Which WHERE statement never returns any rows? SELECT EMPNO, DEPTNO, SALARY FROM
RETAIL.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: 75
Which two expressions are used to distinguish null data from n on- null data? (Choose two.)
A. = NULL
B. IS NULL
C. < > NULL
D. NULL ONLY
E. IS NOT NULL
Answer: B, 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';
A. Dawn, Bob, Geoff, Gorm
B. Alison, Bob, Dawn, Geoff
C. Dawn, Bob, Geoff, Gorm, Paul
D. Alison, Bob, Dawn, Geoff, Gorm
Answer: B
Question: 77
Which 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 18 of 27
© SelfExamEngine.com
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));
A. 11
B. 22
C. 30
D. 47
E. 55
Answer: E
Question: 79
Which 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: 80
What data type results from the following calculation? SELECT DATE '2003-02-15' - DATE '200301-15';
A. DATE
B. INTEGER
C. INTERVAL DAY
D. INTERVAL MONTH
Answer: B
Question: 81
SAMPLEID expressions can appear with the SAMPLE command in which two SQL clauses?
(Choose two.)
A. WHERE
B. SELECT
C. GROUP BY
D. ORDER BY
Answer: B, D
Question: 82
Considering the following SQL statement: SELECT state, SAMPLEID FROM stores SAMPLE
WITH REPLACEMENT WHEN state = 'CA' THEN 2, 4 WHEN state = 'MI' THEN 5, 7 ELSE 50
ORDER BY 2; How many distinct SAMPLEID values will appear in the answer set, assuming 10
rows from every state in the stores table?
A. 2
B. 4
C. 5
D. 68
Page 19 of 27
© SelfExamEngine.com
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, 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: 84
Which 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: 85
What is the result of the following query? SELECT last_name FROM employee ee WHERE
ee.salary_amount > (SELECT AVG (em.salary_amount) FROM employee em WHERE
em.department_number = ee.department_number);
A. all employees whose salaries are greater than the average salary
B. 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 salary
D. 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. 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: 87
What is the result of the following query? SELECT INDEX (SUBSTRING ('DONNA KRAUS'
FROM 6 FOR 5), 'RAU');
A. 1
B. 2
C. 3
Page 20 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
D. 4
Answer: C
Question: 88
Which 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: 89
Which rows will this UNION operation return to the user? SELECT col_1 FROM table_a UNION
SELECT col_6 FROM table_b;
A. all rows in table_a that have matching rows in table_b
B. all rows from table_a and table_b, including duplicate rows
C. all rows from table_a and table_b, with duplicate rows eliminated
D. all rows from table_a and table_b, 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. MINUS
B. UNION
C. EXCEPT
D. INTERSECT
Answer: B
Question: 91
While using ordered analytic functions, which SQL command specifies the window or subset of
data?
A. IN ()
B. OVER ()
C. WINDOW ()
D. GROUP BY ()
Answer: B
Question: 92
Within ordered analytic functions, what is signified by the syntax element UNBOUNDED
PRECEDING ?
A. the one row prior to the current row
B. the entire partition before the current row
C. the number of rows before the current row
D. the entire partition before and after the current row
Page 21 of 27
© SelfExamEngine.com
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. 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: 94
What 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: 95
Which 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: 96
Which two can be specified in the CREATE TABLE statement? (Choose two.)
A. join index
B. data block size
C. before and after journaling
D. maximum permanent space
Answer: B, C
Question: 97
Which 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: 98
Which SQL clauses always perform the same type of operations?
Page 22 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
A. QUALIFY and HAVING
B. DISTINCT and QUALIFY
C. HAVING and GROUP BY
D. HAVING and DISTINCT
Answer: A
Question: 99
You have an EMPLOYEE table with columns name, salary . Which two SQL statements produce
a 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 ) e
WHERE 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 EMPLOYEE
HAVING salary > avg_sal) e;
Answer: A, 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, dept_no HAVING COUNT(*) > 1;
Given the table and the query shown above, how many rows are in the result set?
A. 1
B. 2
C. 3
D. 30
E. 80
Answer: A
Question: 101
The choice of ANSI vs. Teradata mode affects which three items? (Choose three.)
A. data conversions
B. rounding behavior
C. case sensitivity defaults
D. transaction protocol behavior
Answer: A, C, D
Question: 102
Which 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 23 of 27
© SelfExamEngine.com
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.)
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: 104
What 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 column
C. accurate time measurements for query processing
D. details of which indexes, if any, will be used to process the query
E. recommendations to improve the query based on timing and sizing
Answer: A, D
Question: 105
Which option is available with Global Temporary tables?
A. Identity Column
B. Collect Statistics
C. Permanent Journaling
D. 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. Volatile
B. Derived
C. Permanent
D. Global Temporary
Answer: D
Question: 107
Which 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 24 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
Answer: A, B, C
Question: 108
Which 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: 109
Considering the following SQL, 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 ;
A. The SQL statement is not syntactically correct because no ELSE statement exists within the
CASE statement.
B. The SQL statement is not syntactically correct because a CASE statement cannot be used
within a WHERE clause.
C. 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.
D. 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.
Answer: C
Question: 110
What is another way to write the following expression? CASE WHEN x = y THEN NULL ELSE x
END
A. NULLIF (x, y)
B. COALESCE (x, y)
C. ZEROIFNULL (x, y)
D. COMPRESS NULL (x, y)
Answer: A
Question: 111
Consider the expression: SELECT Name, COALESCE (HomePhone, OfficePhone,
MessageService) FROM
PhoneDir; If only the HomePhone is NULL , what is returned?
A. Name with '?'
B. a n e rror m essage
C. Name with OfficePhone
D. Name with OfficePhone and MessageService
Answer: C
Question: 112
Consider the following set of SQL statements: CREATE MULTISET TABLE t1 (a INTEGER, b
INTEGER) 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 25 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
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: 113
Consider 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: 114
Which four statements are true about executing the following macro? (Choose four.) CREATE
MACRO dept_budget (deptno INT, budgamt DEC(10,2))AS (MERGE INTO department USING
(SELECT :deptno, dept_name, :budgamt FROM dept_name_assignment WHERE departme
nt_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 INSERT
VALUES (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: 115
What is the result of the following query where birthdate has the DATE data type ? SELECT (C
URRENT_ DATE - birthdate ) FROM birthrecord;
A. the day of birth
B. the month of birth
C. the days since birth
D. the years since birth
E. the months since birth
Answer: C
Question: 116
What is the result of SELECT CAST(100000.6 AS SMALLINT) ?
A. 100000
B. 100001
C. 100000.6
Page 26 of 27
© SelfExamEngine.com
Exam Name:
Exam Type
Exam Code:
Teradata SQL v2r5
Teradata
NR0-013
Total Questions:
120
D. Error: Numeric overflow occurred during computation.
Answer: D
Question: 117
Which statement is true?
A.
B.
C.
D.
When an integer value is added to a float value, neither is converted.
When an integer value is added to a float value, the integer is first converted to a float.
When an integer value is added to a float value, the float is first converted to an integer.
You cannot add different data types, so must first use the CAST function to make them the
same.
Answer: B
Question: 118
What is the displayed result of SELECT 3 / 4 * 100.00 ?
A. .00
B. .75
C. 75
D. 75.00
Answer: A
Question: 119
Consider 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 returned
from this SQL statement?
A. a list of all participants with their total weight and a subtotal, 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. a list of all participants with average weight and subtotal of weight for each lot and a total
weight for all lots
D. 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,
job_code FROM employee;
A. job_code
B. dept_num
C. dept_num and job_code
D. It does not apply to either column as the query needs parentheses.
Answer: C
Page 27 of 27
© SelfExamEngine.com
© Copyright 2025 Paperzz