Only Click My Ads Brother, Help this Site Alive

Sunday, March 5, 2017

Oracle AcademyTest: Final Exam Semester 1 Section 16

Oracle AcademyTest: Final Exam Semester 1  Section 16 - Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
oracle academy test
oracle academy test
Semester 1 Final Exam covers Sections 11-17 of Database Design.  


 Section 16 
 (Answer all questions in this section) 
      
11.  The PLAYERS table contains these columns: 
PLAYER_ID NUMBER(9) 
LAST_NAME VARCHAR2(20) 
FIRST_NAME VARCHAR2 (20) 
TEAM_ID NUMBER (4) 
MANAGER_ID NUMBER (9) 
POSITION_ID NUMBER (4) 

Which SELECT statement should you use if you want to display unique combinations of the TEAM_ID and MANAGER_ID columns? 
 Mark for Review 
(1) Points 
      
    SELECT * FROM players; 
  
    SELECT team_id, manager_id FROM players; 
  
    SELECT DISTINCT team_id, manager_id FROM players; (*) 
  
    SELECT team_id, DISTINCT manager_id FROM players; 
  
    SELECT team_id, manager_id DISTINCT FROM players; 
  
      
      Incorrect. See Section 16 Lesson 2.  
  
      
12.  Evaluate this SELECT statement: 
SELECT * 
FROM employees
WHERE department_id IN(10, 20, 30) 
AND salary > 20000; 

Which values would cause the logical condition to return TRUE?
 Mark for Review 
(1) Points 
      
    DEPARTMENT_ID = 10 and SALARY = 20000 
  
    DEPARTMENT_ID = 20 and SALARY = 20000 
  
    DEPARTMENT_ID = null and SALARY = 20001 
  
    DEPARTMENT_ID = 10 and SALARY = 20001 (*) 
  
      
      Incorrect. See Section 16 Lesson 2.  
  
      
13.  Which of the following commands will display the last name concatenated with the job ID from the employees table, separated by a comma and space, and label the resulting column "Employee and Title"?  Mark for Review 
(1) Points 
      
    SELECT " last name" ||', '|| "job_id" + "Employee and Title" FROM employees; 
  
    SELECT last_name||', '|| job_id "Employee and Title" FROM employees; (*) 
  
    SELECT " last name" ||', '|| "job_id" + "Employee and Title" FROM emp; 
  
    SELECT last_name||","|| job_id "Employee and Title" FROM employees; 
  
      
      Incorrect. See Section 16 Lesson 2.  
  
      
14.  What does the DISTINCT keyword do when it is used in a SELECT clause?  Mark for Review 
(1) Points 
      
    Hides NULL values 
  
    Eliminates all unique values and compares values 
  
    Eliminates duplicate rows in the result (*) 
  
    Eliminates only unique rows in the result 
  
      
      Incorrect. See Section 16 Lesson 1.  
  
      
 15.  When using the LIKE condition, which symbol represents any sequence of none, one or more characters?  Mark for Review 
(1) Points 
      
    _ 
  
    % (*) 
  
    # 
  
    & 
  
      
      Incorrect. See Section 16 Lesson 1.  
  
      
16.  Which of the following elements cannot be included in a WHERE clause?  Mark for Review 
(1) Points 
      
    A column alias (*) 
  
    A column name 
  
    A comparison condition 
  
    A constant 
  
      
      Correct.  
  
      
17.  Which comparison operator searches for a specified character pattern?  Mark for Review 
(1) Points 
      
    IN 
  
    LIKE (*) 
  
    BETWEEN...AND... 
  
    IS NULL 
  
      
      Incorrect. See Section 16 Lesson 1.  
  
      
  18.  Where in a SQL statement can you not use arithmetic operators?  Mark for Review 
(1) Points 
      
    SELECT 
  
    FROM (*) 
  
    WHERE 
  
    NONE 
  
      
      Incorrect. See Section 16 Lesson 1.  
  
      
  19.  Which comparison condition would you use to select rows that match a character pattern?  Mark for Review 
(1) Points 
      
    IN 
  
    LIKE (*) 
  
    ALMOST 
  
    SIMILAR 
  
      
      Incorrect. See Section 16 Lesson 1.  
  
      
 20.  The Concatenation Operator does which of the following?  Mark for Review 
(1) Points 
      
    Links rows of data together inside the database. 
  
    Links two or more columns or literals to form a single output column (*) 
  
    Is represented by the asterisk (*) symbol 
  
    Separates columns. 
  

Oracle Academy Test: Final Exam Semester 1 Section 15

Oracle Academy Test: Final Exam Semester 1 Section 15 - Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
oracle academy test
Oracle Academy Test
 Semester 1 Final Exam covers Sections 11-17 of Database Design.  

 Section 15 
 (Answer all questions in this section) 
     
1.  What would you use in the SELECT clause to return all the columns in the table?  Mark for Review 
(1) Points 
      
    An asterisk (*) (*) 
  
    A minus sign (-) 
  
    A plus sign (+) 
  
    The ALL keyword 
  
  
      
 2.  Evaluate this SELECT statement: 
SELECT (salary * raise_percent) raise 
FROM employees; 

If the RAISE_PERCENT column only contains null values, what will the statement return? 
 Mark for Review 
(1) Points 
      
    Only zeroes 
  
    Only null values (*) 
  
    A null value or a zero depending on the value of the SALARY column 
  
    A null value or a numeric value depending on the value of the SALARY column 
  
      
      Incorrect. See Section 15 Lesson 1.  
  
      
  3.  When listing columns in the SELECT list, what should you use to separate the columns?  Mark for Review 
(1) Points 
      
    Commas (*) 
  
    Semicolons 
  
    Dashes 
  
    Underscores 
        

  
 4.  The EMPLOYEES table contains these columns: 
SALARY NUMBER(7,2) 
BONUS NUMBER(7,2) 
COMMISSION_PCT NUMBER(2,2) 

All three columns contain values greater than zero. There is one row of data in the table and the values are as follows: 

Salary = 500, Bonus = 50, Commission_pct = .5 

Evaluate these two SQL statements: 

1. 
SELECT salary + bonus + commission_pct * salary - bonus AS income 
FROM employees; 

2. 
SELECT (salary + bonus ) + commission_pct * (salary - bonus) income 
FROM employees; 

What will be the result? 
 Mark for Review 
(1) Points 
      
    Statement 1 will return a higher value than statement 2. 
  
    Statement 2 will return a higher value than statement 1. (*) 
  
    Statement 1 will display a different column heading. 
  
    One of the statements will NOT execute. 
  
      
      Incorrect. See Section 15 Lesson 1.  
  
      
  5.  Which SQL statement will return an error?  Mark for Review 
(1) Points 
      
    SEL * FR sky; (*) 
  
    select star from sky; 
  
    SELECT star FROM sky; 
  
    SELECT * FROM sky; 
  
        
      
  6.  You query the database with this SQL statement: 
SELECT * 
FROM transaction 
WHERE product_id = 4569; 

Which SQL SELECT statement capabilities are achieved when this statement is executed? 
 Mark for Review 
(1) Points 
      
    Selection only (*) 
  
    Projection only 
  
    Selection and projection only 
  
    Projection, selection and joining 
  
        
      
7.  In which clause of a SELECT statement would you specify the name of the table or tables being queried?  Mark for Review 
(1) Points 
      
    The FROM clause (*) 
  
    The SELECT clause 
  
    The WHERE clause 
  
    Any of the above options, you can list tables wherever you want to in a SELECT statement. 
   
 Section 16 
 (Answer all questions in this section) 
      
8.  The EMPLOYEES table contains these columns: 
LAST_NAME VARCHAR2(25) 
FIRST_NAME VARCHAR2(25) 
EMAIL VARCHAR2(50) 

You are writing a SELECT statement to retrieve the names of employees that have an email address. 

SELECT last_name||', '||first_name "Employee Name" 
FROM employees;

Which WHERE clause should you use to complete this statement?
 Mark for Review 
(1) Points 
      
    WHERE email = NULL; 
  
    WHERE email != NULL; 
  
    WHERE email IS NULL; 
  
    WHERE email IS NOT NULL; (*) 
  
      
      Incorrect. See Section 16 Lesson 3.  
  
      
 9.  You need to display all the values in the EMAIL column that contains the underscore (_) character as part of that email address. The WHERE clause in your SELECT statement contains the LIKE operator. What must you include in the LIKE operator?  Mark for Review 
(1) Points 
      
    The ESCAPE option (\) and one or more percent signs (%) 
  
    The (+) operator 
  
    A percent sign (%) 
  
    The ESCAPE option (\) (*) 
  
      
      Incorrect. See Section 16 Lesson 2.  
  
      
10.  You want to determine the orders that have been placed by customers who reside in Chicago. You write this partial SELECT statement: 
SELECT orderid, orderdate, total 
FROM orders; 

What should you include in your SELECT statement to achieve the desired results?
 Mark for Review 
(1) Points 
      
    AND city = Chicago; 
  
    AND city = 'Chicago'; 
  
    WHERE city = 'Chicago'; (*) 
  
    WHERE city = Chicago;