SQL queries

Tags:
SQL
SQL queries
Consider an organization “ABC” having many employees. An employee works for one department. Each employee identified by using Empid, having Name, address ( described as House_no, city, district, state, pin code) and more than one phone numbers. Department identified by using Dno, having Dname, Dlocation. Each Department having a manager . Each department having many employees. There are many Projects, each project is controlled by the department. Each Project uniquely identified by Pno, having Project_name,Project_location. An employee works on many Projects. Number of hours per week worked on each project by an Employee also needs to be recorded in the database . A project is worked by many employees. Each employee supervised by the supervisor. Employee having many dependents. Dependents having the dependent_name, gender, age, address. Dependents are identified by Empid.
T1(Empid, Emp_Name,city, district, state, pin_code, phoneno, Dno,Dname,Dlocation, Dept_mgr_id, Pno, Project_name, Project_location, Number_of_Hours,Supervisor_Empid, Dependent_name, gender, address)
Queries:
  1. Display the details of the employees who are working on both the projects having project_no 5 and 10.
  2. Display the details of employees having at least two dependents.
  3. Display the project name on which more number of employees are working.
  4. Retrieve the employees who do not have any dependents.
  5. Display the Employee details whose total number of hours per week working on various projects is maximum than all other employees.
  6. Create a view to display the number of employees working in each department.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    Sounds like homework or an interview question. What code have you tried and what were your results? We can help but if this is difficult now, it gets much more involved later on in your career.
    134,780 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: