Project 1
Project 1
• SQL Assignment # 1
A small IT firm designing business software for its clients wants to store and manage its data. It has identified
following entities for which, it will maintain data.
1. Clients
2. Employees
3. Departments
4. Projects
5. EmpProjectTasks *
* This will hold data of employees working on projects.
You are required to create the tables using the information provided below. Once tables are ready, fill in the
given data in each table.
Tejashri F.
DDL & DML
Tejashri F.
DDL & DML
Tejashri F.
DDL & DML
Tejashri F.
DDL & DML
• SQL ASSIGNMENT #2
Given the tables created in Assignment #1, find solutions for the following.
1. Display customer details with business as ‘Consultant’
2. Display employee details who are not ‘Developers’
3. Display project details with budget > 100000
4. Display details of project that are already finished
5. Display employee names beginning with ‘M’
6. Display employee names ending with ‘a’
7. Display the number of months project ‘Inventory’ took for completion
8. Display the task that is ‘In Progress’
9. Display details of departments located in Pune
10. Display employee name and salary in descending order of salary
11. Display tasks in ascending order of end date
12. Display distinct jobs from Employees table
13. Display employee names in all uppercase
14. Display employee name, salary and bonus calculated as 25% of salary
15. Display concatenated string ‘Employee works as Job’ (e.g. Manoj works as Developer) for all employees
16. Display day of week (e.g. Friday) for each start date of projects
17. Display position number of ‘@’ symbol in each email id of clients
18. Display first 3 characters of each client name
19. Display project budget values formatted as ‘$150,000’
20. Display planned end date and review date as 3 months after planned end date for each project
• SQL ASSIGNMENT #3
Given the tables created in Assignment #1, find solutions for the following.
1. Display count of clients
2. Display count of employees and sum of their salaries
3. Display max salary per department
4. Display min salary per job
5. Display average salary
6. Display sum of budget
7. Display count of ‘Coding’ task
8. Display department wise count and sum of salary of employees
9. Display client names and their project desc, start date and budget
10. Display department name, employee name and job
11. Display names of employees doing ‘System Analysis’ along with project name
12. Display job wise count
13. Display employee numbers not present in EmpProjectTasks table using necessary set operator
14. Display employee numbers present in both Employees and EmpProjectTasks table using necessary set operator
15. Display all employee numbers present in both Employees and EmpProjectTasks table using necessary set operator
• SQL ASSIGNMENT #4
Given the tables created in Assignment #1, find solutions for the following.
1. Display the project name with highest budget
2. Display employee names who have same job as ‘Madhav’
3. Display employee’s name and job who worked on ‘Code Change’ task of project 401
4. Display client name whose project’s ‘Coding’ task is ‘In Progress’
5. Display department number, names and salaries of employees who are earning max salary in their departments
6. Display name of department with highest SUM of salary
7. Create a table named ‘CLIENT_PROJECTS’ using CTAS method that includes CLIENT_ID, CNAME,
ADDRESS,BUSINESS,DESCR,BUDGET columns from CLIENTS and PROJECTS tables
8. Increase salary of employees by 15% who have performed task of ‘Testing’ on projects
9. Create a view named DEPT_EMP with DEPTNO,DNAME,LOC,ENAME,JOB, and SALARY columns
10. Create synonym EPT for table EmpProjectTasks
Tejashri F.