0% found this document useful (0 votes)
4 views2 pages

Select Join Query

The document outlines a series of SQL query exercises involving various database tables related to employees, jobs, departments, and locations. Each exercise requires the creation of specific queries to extract information such as employee details, department addresses, job titles, and salary comparisons. The queries aim to enhance understanding of SQL joins and data retrieval from relational databases.

Uploaded by

b230699
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Select Join Query

The document outlines a series of SQL query exercises involving various database tables related to employees, jobs, departments, and locations. Each exercise requires the creation of specific queries to extract information such as employee details, department addresses, job titles, and salary comparisons. The queries aim to enhance understanding of SQL joins and data retrieval from relational databases.

Uploaded by

b230699
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Select Query Join Exercises

Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER,


HIRE_DATE, JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID)
job_history(EMPLOYEE_ID, START_DATE, END_DATE, JOB_ID, DEPARTMENT_ID)
locations(LOCATION_ID, STREET_ADDRESS, POSTAL_CODE, CITY, STATE_PROVINCE,
COUNTRY_ID)
jobs(JOB_ID, JOB_TITLE,MIN_SALARY, MAX_SALARY)
countries (COUNTRY_ID, COUNTRY_NAME, REGION_ID)
departments(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)
regions(REGION_ID, REGION_NAME)

1. Write a query to find the addresses (location_id, street_address, city,


state_province, country_name) of all the departments

2. Write a query to find the name (first_name, last name), department ID and
name of all the employees.

3. Write a query to find the name (first_name, last_name), job, department ID


and name of the employees who works in London.

4. Write a query to find the employee id, name (last_name) along with their
manager_id and name (last_name)

5. Write a query to find the name (first_name, last_name) and hire date of the
employees who was hired after 'Jones'

6. Write a query to get the department name and number of employees in the
department

7. Write a query to find the employee ID, job title, number of days between
ending date and starting date for all jobs in department 90.

8. Write a query to display the department ID and name and first name of
manager.

9. Write a query to display the department name, manager name, and city.

10. Write a query to display the job title and average salary of employees.

11. Write a query to display job title, employee name, and the difference
between salary of the employee and minimum salary for the job

12. Write a query to display the job history that were done by any employee
who is currently drawing more than 10000 of salary.
13. Write a query to display department name, name (first_name, last_name),
hire date, salary of the manager for all managers whose experience is more
than 15 years.

You might also like