تفاصيل العمل

This file contains a set of SQL queries and one UPDATE statement designed to analyze and modify data within a relational database schema, likely for a company or organization (implied by the Company_SD database name and tables like Employee, Departments, Project, and Dependent).

The queries demonstrate various SQL concepts, including joins (implicit and explicit), aggregation (SUM, MAX, MIN, AVG, COUNT), subqueries, and set operations (UNION).

The key objectives of these statements are:

Gender-Specific Dependent Retrieval: Selects dependents who share the same gender as their corresponding employee (e.g., female dependent with female employee, or male dependent with male employee).

Project Work Hours: Calculates the total hours spent on each project.

Employee Data Retrieval (Minimum SSN): Selects the department details for the employee who has the minimum Social Security Number (SSN).

Department Salary Statistics: Calculates the maximum, minimum, and average salary for employees within each department.

Managers without Dependents: Finds the last name of department managers who do not have any recorded dependents.

Under-Average Salary Departments: Identifies departments where the average employee salary is less than the overall company average salary.

Employee Project Assignments: Lists the full name of each employee and the project name they are working on, sorted by department number, last name, and first name.

Second Highest Salary: Retrieves the salary value(s) that are equal to the second highest salary in the Employee table.

Dependent Name Match: Finds pairs of employees and their dependents where the dependent's name contains part of the employee's first or last name.

Salary Update (Al Rabwah Project): Increases the salary by 30% (Salary + Salary * 0.3) for all employees currently working on the project named 'Al Rabwah'.

بطاقة العمل

اسم المستقل
عدد الإعجابات
0
تاريخ الإضافة
تاريخ الإنجاز
المهارات