Examine the description of EMPLOYEES table:
The session time zone is the same as the database server.
Which two statements will list only the employees who have been working with the company for more than five years? (Choose two.)
Examine the description of EMPLOYEES table:
The session time zone is the same as the database server.
Which two statements will list only the employees who have been working with the company for more than five years? (Choose two.)
To find employees who have been with the company for more than five years, you need to compare the difference between the current date and the hire date. Since the difference is required in years, dividing the date difference by 365 will yield the number of years. Thus, the correct SQL statements are those that use CURRENT_DATE or SYSDATE and divide by 365. Option D is correct but incomplete due to a typo and should state that the result should be greater than 5. Option E is correctly formatted and calculates the difference between SYSDATE and hire_date divided by 365 to get the number of years.
DE is correct (even though D seems to be with typo). F is not correct as default precision of DAY is 2 - should be INTERVAL '1845' DAY(4)
DE is correct
I think EF. D is with typo?
Eliminate ABC because of fact /12 .. in order to get year it should be /365.
DE should be the correct answer
CE tested SELECT FIRST_NAME, hire_date FROM hr.employees WHERE (SYSDATE - hire_date) / 12 > 5; SELECT FIRST_NAME, hire_date FROM hr.employees WHERE (SYSTIMESTAMP - hire_date) / 12 > INTERVAL '5' YEAR; SELECT FIRST_NAME, hire_date FROM hr.employees WHERE (CURRENT_DATE - hire_date) / 12 > 5; SELECT FIRST_NAME, hire_date FROM hr.employees WHERE (CURRENT_DATE - hire_date) / 365 > SELECT FIRST_NAME, hire_date FROM hr.employees WHERE (SYSDATE - hire_date) / 365 > 5; SELECT FIRST_NAME, hire_date FROM hr.employees WHERE (SYSTIMESTAMP - hire_date) / 365 > INTERVAL '1825' DAY;
D. SELECT employee_name FROM employees WHERE (CURRENT_DATE - hire_date) / 365 > 5; E. SELECT employee_name FROM employees WHERE (SYSDATE - hire_date) / 365 > 5; DE now that i am running again the others if you run them are calculate garbage also D is missing a 5;
I think EF. D is with typo?