Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

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

Employee Model  Database - w3resource online SQLite practice

Structure of 'hr' database :

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?