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]
2 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]2 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
What is used to configure data sources for applications that require access to a database?
Radda [10]
A network is used to configure data sources for applications that require access to a database?
6 0
3 years ago
Which of the following is true about operating system.
zalisa [80]

Answer:

google kis kam ka hai us se puch lo

7 0
2 years ago
15. What type of presentation includes information created in a different Office application?
blondinia [14]
 the answer to the question is a Embedded ( I just learned this like a month ago so im pretty sure it right :))
4 0
3 years ago
Write a program that asks the user for three strings.
Varvara68 [4.7K]

Answer:

good luck djfjjdndnfjfjjfjfdsadd

5 0
3 years ago
Question Workspace Check My Work Copying computer software, video games, movies, or music without paying the producer for them i
Tcecarenko [31]

Answer:

Option B, CUSTOMER MISBEHAVIOR.

Explanation:

Consumer misbehavior can defined as the behavioral acts by consumers which violate the generally accepted norms of conduct in consumption situations, and disrupt the order expected in such situations. Misbehavior by consumers disrupts the openness, impersonal trust, and orderliness of the exchange environment.

Some of the examples of customer misbehavior are: shoplifting, bending rules, breaking rules by ignoring warnings and using products in forbidden or ways not recommended...

* Routinized response behaviour is a type of purchasing scenario whereby the purchaser of a product or a service has past experience with purchasing it and automatically makes the decision to purchase again.

* Psychological influences refers to the workings of the mind or psyche that influences customer decisions.

* Social influences refers to the intentional and unintentional efforts to change another person's beliefs, attitudes, or behavior.

Therefore, the option that best suits the question is option B, CUSTOMER MISBEHAVIOR.

3 0
3 years ago
Other questions:
  • A(n) ________ is a variable that receives an argument that is passed into a function. global argument scope parameter
    15·1 answer
  • Which of the following laptop features allows users to overcome keyboard size restrictions?
    11·1 answer
  • Write a function that, given an array A of N integers, of which represents loads caused by successive processes, the function sh
    15·1 answer
  • Which line in the following program contains the header for the showDub function? 1 #include 2 using namespace std; 3 4 void sho
    9·1 answer
  • Kelly is a college sophomore majoring in computer science. She is interested in gaining exposure to the most useful and current
    14·1 answer
  • س2) اکتب خوارزميه لحل المعادلة الرياضيه الاتيه
    9·1 answer
  • WHAT DOES THE SCRATCH CODE BELOW DO?
    6·1 answer
  • If your cell phone rings while you are driving and you do not have a hands-free device you should
    9·1 answer
  • A related database stores data in the form of______
    15·1 answer
  • Integrity constraints are enforced by Group of answer choices A. The operating system B. The end user C. The database designer D
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!