Databases and SQL Fundamentals

Comprehensive quiz covering database concepts, SQL querying, and multiple database platforms including DB2, Teradata, Oracle, and SQL Server BI tools

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?

  1. Immediately after the SELECT clause
  2. After the ORDER BY clause
  3. After the WHERE clause
  4. Before the WHERE clause
Question 2 Multiple Choice (Single Answer)

Which SELECT statement will the result ‘ello world’ from the string ‘Hello World’?

  1. SELECT SUBSTR( ‘Hello World’,1) FROM dual;
  2. SELECT INITCAP(TRIM (‘Hello World’, 1,1)) FROM dual;
  3. SELECT LOWER(TRIM (‘H’ FROM ‘Hello World’)) FROM dual;
  4. SELECT LOWER(SUBSTR(‘Hello World’, 2, 1) FROM dual;
Question 3 Multiple Choice (Single Answer)

Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?

  1. SELECT ename, salary*12 ‘Annual Salary’ FROM employees;
  2. SELECT ename, salary*12 “Annual Salary” FROM employees;
  3. SELECT ename, salary*12 AS Annual Salary FROM employees;
  4. SELECT ename, salary*12 AS INITCAP(“ANNUAL SALARY”) FROM employees
Question 4 Multiple Choice (Single Answer)

Which clause would you use in a SELECT statement to limit the display to those employees whose salary is greater than 5000?

  1. ORDER BY SALARY > 5000
  2. GROUP BY SALARY > 5000
  3. HAVING SALARY > 5000
  4. WHERE SALARY > 5000
Question 5 Multiple Choice (Single Answer)

You need to calculate the total of all salaries in the accounting department. Which group function should you use?

  1. MAX
  2. MIN
  3. SUM
  4. TOTAL
Question 6 Multiple Choice (Single Answer)

Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"?

  1. SELECT TO_CHAR(SYSDATE,'yyyy') FROM dual;
  2. SELECT TO_DATE(SYSDATE,'yyyy') FROM dual;
  3. SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;
  4. SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual;
Question 7 Multiple Choice (Single Answer)

In which scenario would TOP N analysis be the best solution?

  1. You want to identify the most senior employee in the company.
  2. You want to find the manager supervising the largest number of employees
  3. You want to identify the person who makes the highest salary for all employees.
  4. You want to rank the top three sales representatives who have sold the maximum
Question 8 Multiple Choice (Single Answer)

Evaluate the SQL statement: SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual; Which values are displayed?

  1. 46 and 45
  2. 46 and 45.93
  3. 50 and 45.93
  4. 50 and 45.9
Question 9 Multiple Choice (Single Answer)

special purpose subset of enterprise data used by a particular department, function or application

  1. Data dictionary
  2. Data marts
  3. Data sets
  4. Nodes
Question 10 Multiple Choice (Single Answer)

facility Which allows you to preview how Teradata will execute a requested query.

  1. Help
  2. Run
  3. Explain
  4. complie
Question 11 True/False

Tables must always be assigned a Primary Index at creation

  1. True
  2. False
Question 12 Multiple Choice (Single Answer)

Primary Index can not be

  1. Null
  2. dropped
  3. have duplicates
  4. All of the above
Question 13 Multiple Choice (Single Answer)

_________ distributes the row to the appropriate AMP

  1. NODE
  2. clique
  3. Bynet
  4. PE
Question 14 True/False

SSIS Packages are of type container

  1. True
  2. False
Question 15 Multiple Choice (Single Answer)

What Service / Server in the Microsoft SQL BI tool support Creation / rendering of reports?

  1. SSAS
  2. SSIS
  3. SSRS
  4. SQL RDBMS
Question 16 Multiple Choice (Single Answer)

What is Business Intelligence?

  1. A method of storing and presenting key enterprise data
  2. Allows End users to analyze data to understand business results
  3. To accurately forecast future results
  4. All of the above
Question 17 Multiple Choice (Single Answer)

What Service / Server in the Microsoft SQL BI tool set allows for ETL kind of activities?

  1. SSAS
  2. SSIS
  3. SSRS
  4. SQL RDBMS
Question 18 Multiple Choice (Single Answer)

Which of the following causes a lock that is being held by an application using the Cursor Stability isolation level to be released?

  1. The cursor is moved to another row
  2. The row the cursor is on is deleted by the application
  3. The row the cursor is on is deleted by another application
  4. The row the cursor is on needs to be updated by another application
Question 19 Multiple Choice (Single Answer)

When the program name is not in the plan, we get

  1. -810
  2. -801
  3. -805
  4. -825
Question 20 Multiple Choice (Single Answer)

B37 abend during SPUFI is due to

  1. Space Issues
  2. Data Issues
  3. No records found while querying the table
  4. Both a & b