SQLite Exercise: Display the job history that was done by any employee who is currently drawing more than 10000 of salary
Write a query to display the job history that was done by any employee who is currently drawing more than 10000 of salary.
Sample table : employees
Sample table : Job_history
SQLite Code:
SELECT jh.* FROM job_history jh
JOIN employees e
ON (jh.employee_id = e.employee_id)
WHERE salary > 10000;
Output:
employee_id start_date end_date job_id department_id ----------- ---------- ---------- ---------- ------------- 102 1993-01-13 1998-07-24 IT_PROG 60 101 1989-09-21 1993-10-27 AC_ACCOUNT 110 101 1993-10-28 1997-03-15 AC_MGR 110 201 1996-02-17 1999-12-19 MK_REP 20 114 1998-03-24 1999-12-31 ST_CLERK 50
Practice SQLite Online
Model Database
Structure of 'hr' database :
Improve this sample solution and post your code through Disqus.
Previous: Write a query to display job title, employee name, and the difference between the salary of the employee and minimum salary for the job.
Next: SQLite Exercises
What is the difficulty level of this exercise?
- 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
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework