Question 71

You need to calculate the number of days from 1st January 2019 until today.
Dates are stored in the default format of DD-MON-RR.
Which two queries give the required output? (Choose two.)
SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') - '01-JAN-2019' FROM DUAL;
  • Question 72

    View the Exhibit and examine the structure of the ORDERS table.

    You must select ORDER_ID and ORDER_DATE for all orders that were placed after the last order placed by CUSTOMER_ID 101.
    Which query would give you the desired result?
  • Question 73

    View the Exhibit and examine the structure in the EMPLOYEEStables.

    Evaluate the following SQL statement:
    SELECT employee_id, department_id
    FROM employees
    WHERE department_id= 50 ORDER BY department_id
    UNION
    SELECT employee_id, department_id
    FROM employees
    WHERE department_id= 90
    UNION
    SELECT employee_id, department_id
    FROM employees
    WHERE department_id= 10;
    What would be the outcome of the above SQL statement?
  • Question 74

    View the exhibit and examine the structure of the EMPLOYEEStable.

    You want to display all employees and their managers having 100 as the MANAGER_ID. You want the output in two columns: the first column would have the LAST_NAMEof the managers and the second column would have LAST_NAMEof the employees.
    Which SQL statement would you execute?
    SELECT m.last_name "Manager", e.last_name "Employee"
  • Question 75

    Which two statements are true regarding the EXISTS operator used in the correlated subqueries? (Choose two.)