programming-examples/sql/JoinHRDatabase/23. Write a query in SQL to display the employee ID, job name, number of days worked in for all those jobs in department 80.sql
2019-11-18 14:05:53 +01:00

5 lines
280 B
SQL

/*23. Write a query in SQL to display the employee ID, job name, number of days worked in for all those jobs in department 80.*/
SELECT employee_id, job_title, end_date-start_date DAYS
FROM job_history
NATURAL JOIN jobs
WHERE department_id=80;