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
You are given a class named Clock that has one int instance variable called hours.
Vlad [161]

Answer:

public Clock(int hours) {

       this.hours = hours;

   }

Explanation:

In Java programming language, Constructors are special methods that are called to initialize the variables of a class when a new object of the class is created with the new keyword. Consider the complete code for the class below;

<em>public class Clock {</em>

<em>    private int hours;</em>

<em>    public Clock(int hours) {</em>

<em>        this.hours = hours;</em>

<em>    }</em>

<em>}</em>

In this example above,  an object of this class can created with this statement Clock myclock = new Clock(6); This is a call to the constructor and passes a parameter (6) for hours

7 0
2 years ago
If someone has the IP address 127.0.0.1 and tries to connect to the address 127.255.252.255, which are they attempting to connec
sertanlavr [38]
B is the answer i think
6 0
2 years ago
Excel Enterprises uses a Web​ site, online social​ networks, and print advertisements to promote its products. Since Excel Enter
Nuetrik [128]

Answer:

Consistency

Explanation:

Bi integrating marketing communications, we can infer that the different brands working under Excel Enterprises have the same basic design, so the marketing department can sell their features easily, without having to create different campaigns or protocols for each individual product.

This homogeneous design then turns intuitive for the user, a textbook definition of consistent design, and the tone is maintained through the different brands.

Just like when you move from Microsoft's Excel to Microsoft's Word, you know the usage of each program is different, but the layout is the same, allowing you to understand the basics of the UX (user interface) of one, by understanding the other.  

4 0
3 years ago
Read 2 more answers
Which Boolean operator produces the result 1 only if both values are 1? Which Boolean operator produces the result 0 only if bot
lorasvet [3.4K]

Blank 1 is AND

Blank 2 is OR

5 0
3 years ago
Gregor installed a third stick of known-good RAM into his Core i7 system, bringing the total amount of RAM up to 3 GB. Within a
MA_775_DIABLO [31]

Answer:

The speed or quality was different.

Explanation:

The new ram that he installed most likely had a different rate, or was a different quality than the old ram.

5 0
2 years ago
Other questions:
  • How i can download play store?​
    10·1 answer
  • What is the most recognized and widely used database of published nursing practice literature?
    15·1 answer
  • Read the following scenario: A project will require more people than originally estimated. Identify the possible risks to the pr
    8·2 answers
  • Most manual-transmission vehicles use a _______ to gauge engine speed in RPMs. A. variable valve timer B. tachometer C. torque i
    11·1 answer
  • By Carl Sandburg
    6·1 answer
  • In which of the following situations should you expect to provide your Social Security number?
    13·1 answer
  • Which of the following tools helps ensure your document will open in older versions of word
    13·1 answer
  • Which of the following words best describes the word icon ​
    14·2 answers
  • Use the drop-down menu to complete the steps for using the Goal Seek feature.
    13·2 answers
  • What is the process of smaw welding​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!