SQL JOINS on HR Database: HR: Display the job title, department name, full name, and starting date for all the jobs which started between 1st January, 1993 and 31 August, 1997.
SQL JOINS on HR Database: Exercise-13 with Solution
13. From the following tables, write a SQL query to find those employees who joined between 1st January 1993 and 31 August 1997. Return job title, department name, employee name, and joining date of the job.
Sample table: job_history
Sample table: jobs
Sample table: departments
Sample table: employees
SELECT job_title, department_name, first_name || ' ' || last_name AS Employee_name, start_date FROM job_history JOIN jobs USING (job_id) JOIN departments USING (department_id) JOIN employees USING (employee_id) WHERE start_date>='1993-01-01' AND start_date<='1997-08-31';
job_title department_name employee_name start_date Administration Assistant Executive Jennifer Whalen 1995-09-17
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: From the following tables, write a SQL query to find those employees who work in a department where the employee of last name 'Taylor' works. Return first name, last name and department ID.
Next: From the following tables, write a SQL query to find the difference between maximum salary of the job and salary of the employees. Return job title, employee name, and salary difference.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
SQL: Tips of the Day
How to restore a dump file from mysqldump?
It should be as simple as running this:
mysql -u <user> -p < db_backup.dump
If the dump is of a single database you may have to add a line at the top of the file:
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework