Oracle: List the name, hire date of all the employees who joined on 1-JUL-2006, 24-MAR-2007, 04-JAN-2008 in ascending order of seniority
Oracle Operator: Exercise-12 with Solution
Write query to list the name (first and last name), hire date of all the employees who joined on 1-JUL-2006, 24-MAR-2007, 04-JAN-2008 in ascending order of seniority.
Sample table : employees
Sample Solution:
Oracle Code:
SELECT first_name, last_name, hire_date
FROM employees
WHERE hire_date IN('01-JUL-2006','24-MAR-2007','04-JAN-2008')
ORDER BY hire_date asc;
Output:
FIRST_NAME LAST_NAME HIRE_DATE -------------------- ------------------------- --------- Samuel McCain 01-JUL-06 Elizabeth Bates 24-MAR-07 Charles Johnson 04-JAN-08
Pictorial Presentation:
Improve this sample solution and post your code through Disqus.
Previous: Write a query to list the name (first and last name), hire date of all the employees who joined before or after 2005.
Next: Write a query to concatenate first name, last name and job id from employees table in the following format.
What is the difficulty level of this exercise?
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/oracle-exercises/operator/oracle-operator-exercise-12.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics