Databases and SQL Fundamentals
Comprehensive quiz covering database concepts, SQL querying, and multiple database platforms including DB2, Teradata, Oracle, and SQL Server BI tools
Questions
In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?
- Immediately after the SELECT clause
- After the ORDER BY clause
- After the WHERE clause
- Before the WHERE clause
Which SELECT statement will the result ‘ello world’ from the string ‘Hello World’?
- SELECT SUBSTR( ‘Hello World’,1) FROM dual;
- SELECT INITCAP(TRIM (‘Hello World’, 1,1)) FROM dual;
- SELECT LOWER(TRIM (‘H’ FROM ‘Hello World’)) FROM dual;
- SELECT LOWER(SUBSTR(‘Hello World’, 2, 1) FROM dual;
Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?
- SELECT ename, salary*12 ‘Annual Salary’ FROM employees;
- SELECT ename, salary*12 “Annual Salary” FROM employees;
- SELECT ename, salary*12 AS Annual Salary FROM employees;
- SELECT ename, salary*12 AS INITCAP(“ANNUAL SALARY”) FROM employees
Which clause would you use in a SELECT statement to limit the display to those employees whose salary is greater than 5000?
- ORDER BY SALARY > 5000
- GROUP BY SALARY > 5000
- HAVING SALARY > 5000
- WHERE SALARY > 5000
You need to calculate the total of all salaries in the accounting department. Which group function should you use?
- MAX
- MIN
- SUM
- TOTAL
Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"?
- SELECT TO_CHAR(SYSDATE,'yyyy') FROM dual;
- SELECT TO_DATE(SYSDATE,'yyyy') FROM dual;
- SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;
- SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual;
In which scenario would TOP N analysis be the best solution?
- You want to identify the most senior employee in the company.
- You want to find the manager supervising the largest number of employees
- You want to identify the person who makes the highest salary for all employees.
- You want to rank the top three sales representatives who have sold the maximum
Evaluate the SQL statement: SELECT ROUND(45.953, -1), TRUNC(45.936, 2) FROM dual; Which values are displayed?
- 46 and 45
- 46 and 45.93
- 50 and 45.93
- 50 and 45.9
special purpose subset of enterprise data used by a particular department, function or application
- Data dictionary
- Data marts
- Data sets
- Nodes
facility Which allows you to preview how Teradata will execute a requested query.
- Help
- Run
- Explain
- complie
Tables must always be assigned a Primary Index at creation
- True
- False
Primary Index can not be
- Null
- dropped
- have duplicates
- All of the above
_________ distributes the row to the appropriate AMP
- NODE
- clique
- Bynet
- PE
SSIS Packages are of type container
- True
- False
What Service / Server in the Microsoft SQL BI tool support Creation / rendering of reports?
- SSAS
- SSIS
- SSRS
- SQL RDBMS
What is Business Intelligence?
- A method of storing and presenting key enterprise data
- Allows End users to analyze data to understand business results
- To accurately forecast future results
- All of the above
What Service / Server in the Microsoft SQL BI tool set allows for ETL kind of activities?
- SSAS
- SSIS
- SSRS
- SQL RDBMS
Which of the following causes a lock that is being held by an application using the Cursor Stability isolation level to be released?
- The cursor is moved to another row
- The row the cursor is on is deleted by the application
- The row the cursor is on is deleted by another application
- The row the cursor is on needs to be updated by another application
When the program name is not in the plan, we get
- -810
- -801
- -805
- -825
B37 abend during SPUFI is due to
- Space Issues
- Data Issues
- No records found while querying the table
- Both a & b