Write an SQL Query to list the name(s) and address(es) of employees who work at the department named- 'Human Resources’? (Hint: Use Table Joining) Write an SQL Query to list the names of all projects run by the department – ‘IT Transformation’? (Hint: Use Table Joining)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section2.1: Introduction To C++
Problem 13E: (Practice) You’re responsible for planning and arranging the family camping trip this summer. List a...
icon
Related questions
Question

Based on the picture please help me write an SQL querey for each (don't answer the actual question just please write an SQL querey)

  1. Write an SQL Query to list the name(s) and address(es) of employees who work at the department named- 'Human Resources’? (Hint: Use Table Joining)
  2. Write an SQL Query to list the names of all projects run by the department – ‘IT Transformation’? (Hint: Use Table Joining)
    1. Write an SQL Query to list the department number and the count of projects in each of these departments and only display those values that has more than 3 count.  Rename the count column as ‘Project Count’.

    (Hint1: Use GROUP BY and HAVING. You need not use table joining) 

    (Hint2: It is OK to see an empty outcome as long as your query is correct)

  3. Write an SQL Query to count unique ‘Female’ employees who have been designated as ‘Staff’ and also have worked for more than 20 hours on a single project? Rename the count value as ‘Employee Count’ (Hint: Use Table Joining).
Employee (empNo, firstName, lastName, address, DOB, sex, position, deptNo)
Department (deptNo, deptName, mgrEmpNo)
Project (projNo, projName, deptNo)
WorksOn (empNo, projNo, hours Worked)
Dependent (empNo, Dependent_name, Sex, Bdate, Relationship)
Transcribed Image Text:Employee (empNo, firstName, lastName, address, DOB, sex, position, deptNo) Department (deptNo, deptName, mgrEmpNo) Project (projNo, projName, deptNo) WorksOn (empNo, projNo, hours Worked) Dependent (empNo, Dependent_name, Sex, Bdate, Relationship)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning