Solution:-
Create a Database in 3NF & write queries for following.
• List the name of employee and department having salary > 50000.
SQL>select ename,dname from Employee where salary>50000;
• List names of all employees who works with ‘Ramesh’ on same project.
SQL>select ename,pname form Employee,project,ep where employee.eno=ep.eno and project.pno=ep.pno and ename='Ramesh';
• Find the names of employees who are working on project having budget greater than 30000.
SQL>select ename,pname,budget from Employee.project,ep where employee eno=ep eno and project.pno and budget>30000;
• List name of department that have at least two projects under them.
SQL>select dname,pname from Employee,project,ep where employee.eno=ep.eno and project.pno=ep.pno group by dname.pname having count(project.pname)>2;
• Update budget of a project done by employees of Computer Department by 15%.
SQL>
/