You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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;