Basic command of data base is query and DatabaseHomeworkHelp is expert in providing queries assignment help for DBMS students. We have open platform for everyone and queries homework help is accessible for every students irrespective of their academic grades. We showed the inspiration to help with queries assignment over the years and got positive response from students.
We got the goodwill of best in help with queries project. This insightful rank is only happening because of the efforts we put to help for finding every queries problem solution. Our reasonableness is to show the skill in queries project help. We claim that with us you can learn more as we have queries online expert tutor service for your coaching. The demand of queries assignment help is increasing due to increment in database study, and only our company is capable of showing talent in help with queries assignment because of its wide resources.
We are the company others benchmark for help with queries project. One of our best facility for coaching students is queries online expert tutor. We analyzed situation and need of queries project help and asserted our full talents for this. While focusing on other subjects you can get our help for queries problem solution.
Queries are command that users sent to database in order to get the result. It is also called as line of inquiry. It can get the complete columns to get specific requirement based rows or column from the tables.
Note: – The queries solved below are just the sample questions on SQL that our tutors provided for your understanding purpose. It is not the solved solution on database that we have delivered to our clients in the past. We provide you with 100% plagiarism free homework with complete quality check. We also believe in completeness of solution within the deadline.
Question:-The task of this assignment is to write the database queries to retrieve the data from the database of employees table in dual. The queries need to include Sjoins like left outer join etc.
A. SELECT employee1.emp_name, employee1.emp_SSN, dependents.firstname, dependents.birthdate,dependents.relation FROM employee1 LEFT JOIN dependents ON employee1.emp_Id=dependents.emp_id ORDER BY employee1.emp_name;
B. SELECT employee1.emp_name, proj_emp.proj_id FROM employee1 INNER JOIN proj_emp ON employee1.emp_id = proj_emp.emp_id ORDER BY employee1.emp_name;
C. Two Parts
a. if you want to list all the employee whether have a mentor or not
select employee1.emp_name as employeeName, employee1.emp_SSN as employeeSSN, mentor.emp_name as mentorName, mentor.emp_SSN as mentorSSN from employee1 LEFT JOIN employee1 mentor ON employee1.emp_sup = mentor.emp_id;
b. If only want to list employees having mentors
select employee1.emp_name as employeeName, employee1.emp_SSN as employeeSSN, mentor.emp_name as mentorName, mentor.emp_SSN as mentorSSN from employee1 INNER JOIN employee1 mentor ON employee1.emp_sup = mentor.emp_id;
D. select temp1.empName, temp1.empSal, departments.dname FROM departments INNER JOIN(select temp.empName as empName, temp.empSal as empSal, temp.empDepId as empDep FROM (select employee1.emp_name as empName, employee1.emp_sal as empSal, employee1.emp_dep as empDepId FROM employee1 order by employee1.emp_sal desc) as temp GROUP BY temp.empDepId) as temp1 ON temp1.empDep = departments.dep_id;
E. select sum(proj_emp.workhr), projects.proj_id from projects INNER JOIN proj_emp ON projects.proj_id = proj_emp.proj_id group by projects.proj_id order by sum(proj_emp.workhr) DESC LIMIT 1;
F. select employee.emp_name, employee.emp_SSN, temp.NoOfDependents from employee INNER JOIN(select count(*) as NoOfDependents, dependents.emp_id as id from dependents group by dependents.emp_id order by count(*) DESC LIMIT 1) as temp ON temp.id = employee.emp_id;
G. Two Parts:
a. If you want to list employees who are doing projects
select temp.empName, temp.empDept, temp.projId, projects.pname from projects INNER JOIN (select employee1.emp_name as empName, employee1.emp_dep as empDept, proj_emp.proj_id as projId from employee1 LEFT JOIN proj_emp ON proj_emp.emp_id = employee1.emp_id) as temp ON temp.projId = projects.proj_id;
b. If you want to list all the employees
select temp.empName, temp.empDept, temp.projId, projects.pname from projects RIGHT JOIN (select employee1.emp_name as empName, employee1.emp_dep as empDept, proj_emp.proj_id as projId from employee1 LEFT JOIN proj_emp ON proj_emp.emp_id = employee1.emp_id) as temp ON temp.projId = projects.proj_id;
H. select departments.dname, temp2.finalTime from departments INNER JOIN(select sum(temp1.etime) as finalTime, temp1.empDept as depId FROM (select employee1.emp_dep as empDept, temp.empID as eID, temp.time as etime FROM employee1 INNER JOIN(select proj_emp.emp_id as empId, sum(proj_emp.workhr) as time from proj_emp group by proj_emp.emp_id) as temp ON employee1.emp_id = temp.empID) as temp1 group by temp1.empDept) as temp2 ON departments.dep_id = temp2.depID;