subject

Retrieve the names of employees who work on exactly one project that is controlled by their department. (It does not matter how many non-departmental projects they work on.) Also show the department name, and the project name and location. Show results in ascending alpha order (by last name and then first name).
Column Headings: FNAME LNAME DNAME PNAME PLOCATION

I currently have a list of names who work on projects controlled by their departments. But I am unsure on how to trim down the table so that it shows the employees who work on exactly one project controlled by there department. (ie, james borg and jennifer wallace). Values are subject to change, so i can not just do a direct comparison to their last names or something.

SQL Query I produced:

select distinct fname, lname, dname, pname, plocation
from works_on, project, employee, department
where works_on. pno = project. pnumber
and works_on. essn = employee. ssn
and project. dnum = employee. dno
and department. dnumber = employee. dno
order by lname, fname;

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Your mom wants to purchase a laptop computer. she said she wants her new computer to be able to play her dvds so she can listen to music and wants to know what type of optical drives will play her disk. which type of drive should she look for?
Answers: 1
You know the right answer?
Retrieve the names of employees who work on exactly one project that is controlled by their departme...
Questions
question
Mathematics, 28.01.2020 20:44