0% found this document useful (0 votes)
5 views

Lab 3

The document contains 8 multi-part SQL queries to retrieve information from various tables in a database such as listing department details, employee details by gender, projects details and analyzing salary details.

Uploaded by

duydongk6
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lab 3

The document contains 8 multi-part SQL queries to retrieve information from various tables in a database such as listing department details, employee details by gender, projects details and analyzing salary details.

Uploaded by

duydongk6
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Part A.

Standalone Queries
5 points each.

1. List department number, department name, and number of employees in each department,
ordered by number of employees in each department (GROUP BY two attributes).

2. List department number, department name, and number of employees in departments that
have more than 2 employees, ordered by department number (GROUP BY and HAVING).

3. List the name and location of department 1, 3, and 5.

4. List female employee name and project name and project number that she is working on.

5. List the name of employees who works on project controlled by department 5.

6. List the name of employees who are not working on any projects.

7. For each department, list department number, number of employees, and average salary.

8. List the name and number of departments whose employee average salary is between 30000
and 60000.

You might also like