Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 1z0-071 topic 1 question 245 discussion

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

Examine the description of the EMPLOYEES table:



Examine these requirements:

1. Display the last name, date of hire and the number of years of service for each employee.
2. If the employee has been employed 5 or more years but less than 10, display “5+ years of service”.
3. If the employee has been employed 10 or more years but less than 15, display “10+ years of service”.
4. If the employee has been employed 15 or more years, display “15+ years of service”.
5. If none of these conditions matches, display “<5 years of service”.
6. Sort the results by the HIRE_DATE column.

Which statement satisfies all the requirements?

  • A.
  • B.
  • C.
  • D.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
khaleesi89
2 weeks ago
Selected Answer: D
Correct answer is D SELECT e.last_name, hire_date, sysdate, (CASE WHEN (sysdate -TO_YMINTERVAL('15-0')) >= hire_date THEN '15 years of service' WHEN (sysdate -TO_YMINTERVAL('10-0')) >= hire_date THEN '10 years of service' WHEN (sysdate - TO_YMINTERVAL('5-0')) >= hire_date THEN '5 years of service' ELSE '<5 years of service' END) AS years FROM employees ORDER BY hire_date
upvoted 2 times
...
billysunday1
1 month ago
Selected Answer: B
I think answer is B.
upvoted 1 times
khaleesi89
2 weeks ago
It cannot be B TO_YMINTERVAL must be to the left of the operator of the comparation and must be used to deduct a date
upvoted 1 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 ...