Question: 1. Create and run an SQL query that will return/display the first names, email, last names and job identifications of employees from the EMPLOYEES table

 1. Create and run an SQL query that will return/display the

1. Create and run an SQL query that will return/display the first names, email, last names and job identifications of employees from the EMPLOYEES table and the department identifications and department name from the DEPARTMENTS table.

2. Based on your SQL statement above, do you need to qualify the column names in the SELECT statement? Why or why not?

In the above example, since all the column names in the SELECT statement are unique, they dont have to qualify (or put a prefix in front of) the column names.

3. This problem will involve a three-way join using three tables in our database. Write an SQL query to retrieve/display the employee identifications, cities, department name, manager identifications, and location identifications

4. A database analyst is attempting to retrieve/display a report that contains/displays the employees first names, emails, last names, salaries, and job titles for all those employees whose salaries fall between the lowest salary and highest salary.

The database analyst ran the following code but got an error:

SELECT first_name, email, e.last_name, e.salary, j.grade_level

FROM employees e

JOIN job_grades j

ON e.salary

BETWEEN j.lowest_sal AND j.highest_sal;

Describe/show the steps youll take to fix the query above to obtain the desired results (hint: refer to the database schema above): Ensure you run your SQL statement in Oracle SQL Developer.

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!