exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 150 discussion

Actual exam question from Oracle's 1z0-071
Question #: 150
Topic #: 1
[All 1z0-071 Questions]

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.)

  • A. SELECT employee_name FROM employees WHERE (SYSDATE - hire_date) / 12 > 5;
  • B. SELECT employee_name FROM employees WHERE (SYSTIMSSTAMF - hire_date) / 12 > INTERVAL '5' YEAR;
  • C. SELECT employee_name FROM employees WHERE (CURRENT_DATE - hire_date) / 12 > 5
  • D. SELECT employee_name FROM employees WHERE (CURRENT_DATE - hire_date) / 365 >
  • E. SELECT employee_name FROM employees WHERE (SYSDATE - hire_date) / 365 > 5;
  • F. SELECT employee_name FROM employees WHERE (SYSTIMESTAMP - hire_date) / 365 > INTERVAL '1825' DAY;
Show Suggested Answer Hide Answer
Suggested Answer: DE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Thameur01
5 days, 13 hours ago
Selected Answer: DE
missing 5 in the D query, otherwise these 2 are correct, CURRENT_DATE - hire_date and SYSDATE- hire_date return both results in days so we have to divide by 365
upvoted 1 times
...
ArslanAltaf
2 months, 3 weeks ago
Eliminate ABC because of fact /12 .. in order to get year it should be /365.
upvoted 1 times
...
lucemqy
8 months ago
Selected Answer: DE
DE should be the correct answer
upvoted 1 times
...
zouve
1 year ago
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;
upvoted 1 times
zouve
1 year ago
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;
upvoted 3 times
...
...
Darnun
1 year, 3 months ago
Selected Answer: DE
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)
upvoted 4 times
...
Thorc
1 year, 3 months ago
Selected Answer: EF
I think EF. D is with typo?
upvoted 1 times
...
Thorc
1 year, 3 months ago
I think EF. D is with typo?
upvoted 2 times
...
kesammy9
1 year, 4 months ago
Selected Answer: DE
DE is correct
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago