Question: 5. Write and run an SQL query that retrieves all the matching rows in the employees table and departments table with the same department ID.

 5. Write and run an SQL query that retrieves all the

5. Write and run an SQL query that retrieves all the matching rows in the employees table and departments table with the same department ID. We also want all the rows from the DEPARTMENTS table, even if there isnt a match from the EMPLOYEES table. Also, we only want those departments that start with the letter P.

Human Resources [HRI Schema LOCATIONS location id street address postal code city state province Country id DEPARTMENTS department id manager id location id JOB HISTORY employee id .EMPLOYEES start date end date job id employee id first name ast name email phone_number hire date job_id salary commission pct manager id department id COUNTRIES country id country_name region_id department id JOBS job id job title min salary max_salary REGIONS region id region name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!