Write a postgre sql query to make a join to find the employee ID, job title and number of days an employee worked, for all the employees who worked in a department which ID is 90
Write a postgre sql query to make a join to find the employee ID, job title and number of days an employee worked, for all the employees who worked in a department which ID is 90.
Sample table: employees
Output:
pg_exercises=# SELECT employee_id, job_title, end_date-start_date Days pg_exercises-# FROM job_history pg_exercises-# NATURAL JOIN jobs pg_exercises-# WHERE department_id=90; employee_id | job_title | days -------------+--------------------------+------ 200 | Administration Assistant | 2100 200 | Public Accountant | 1644 (2 rows)need an explanation for this answer? contact us directly to get an explanation for this answer