1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Akimi4 [234]
3 years ago
7

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;
Computers and Technology
1 answer:
vodomira [7]3 years ago
7 0

Answer:

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 AND employee.ssn IN(

select essn

FROM works_on

GROUP BY essn

HAVING COUNT(essn)=1

)

order by lname, fname;

Explanation:

You might be interested in
Select the correct answer from each drop-down menu.
mylen [45]

Answer:

"In a VPN, a computer connects to a server and then changes the Internet Protocol of your computer" -urgurlmarie

Source: brainly.com/question/19665457, -urgurlmarie

Opinion: You're answer is correct, I'll take this step by step but by connecting your PC to an server like OpenVPN, or a paid VPN service such as Nord VPN. You are changing your Internet Protocol of your PC to that servers I.P. Address.

7 0
3 years ago
Define the function max2 that takes two integers as arguments and returns the largest of them. Then define the function max_list t
Serga [27]

Answer:

def max_list(a):

   return max(a)

def max2(a,b):

   return max(a,b)

s=max2(2,3)

print('max of two number is:')

print(s)

a=[1,2,3,4,5,6,7,8,9,10]

max_in_list = max_list(a)

print('\n max element in whole list is:')

print(max_in_list)

Explanation:

Above program is written in python:

Function max2 accept two parameters and return one which is greatest of both and funtion max_list accept a parameter list and returns the greatest number in list.

Note: take care of indentation of function while pasting this code on your compiler or ide

6 0
3 years ago
What was the first computer name brand
lilavasa [31]

Answer: <u>Electronic Controls Company</u> and was founded in 1949 by J. Presper Eckert and John Mauchly.

hope this helps!

4 0
2 years ago
Read 2 more answers
States that processing power for computers would double every two years
hodyreva [135]

Answer:

Moore's Law

Explanation:

4 0
2 years ago
What finger is used to key letter c
kumpel [21]

Answer:

your pointer finger

sorry if this is wrong

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • A(n) _______ is a collection of related data organized in a way that facilitates data searches.
    6·1 answer
  • Function templates ___________.
    5·1 answer
  • What is one way to measure technological progress?
    5·1 answer
  • Consider the problem of finding the distance between the two closest numbers in an array of n numbers. (The distance between two
    13·1 answer
  • The PRNG variable ___________ is defined in NIST SP 800-90 as a number associated with the amount of work required to break a cr
    7·1 answer
  • On the server side, the database environment must be properly configured to respond to clients' requests in the fastest way poss
    12·1 answer
  • Technician A says that a lead acid battery uses straight Hydrochloric acid for electrolyte. Technician B says that a lead acid b
    10·2 answers
  • Can you answer the fill in the blanks
    15·2 answers
  • What is the Piston Displacement having 3-inch bore and 3-inch stroke?
    11·1 answer
  • 3.2 code practice question 2. Not in a rush.​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!