Write a postgre sql query to make a join with two tables job_history and employees to display the status of employees who is currently drawing the salary above 10000
Write a postgre sql query to make a join with two tables job_history and employees to display the status of employees who is currently drawing the salary above 10000.
Sample table: employees
Output:
pg_exercises=# SELECT jh.* FROM job_history jh pg_exercises-# JOIN employees em pg_exercises-# ON (jh.employee_id = em.employee_id) pg_exercises-# WHERE em.salary > 10000; employee_id | start_date | end_date | job_id | department_id -------------+------------+------------+------------+--------------- 114 | 1998-03-24 | 1999-12-31 | ST_CLERK | 50 101 | 1993-10-28 | 1997-03-15 | AC_MGR | 110 101 | 1989-09-21 | 1993-10-27 | AC_ACCOUNT | 110 102 | 1993-01-13 | 1998-07-24 | IT_PROG | 60 201 | 1996-02-17 | 1999-12-19 | MK_REP | 20 (5 rows)
need an explanation for this answer? contact us directly to get an explanation for this answer