Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Please help me with this SQL code

Original Message
Name: seancky2
Date: April 1, 2008 at 16:25:00 Pacific
Subject: Please help me with this SQL code
OS: XP
CPU/Ram: AMD
Model/Manufacturer: DELL
Comment:
Hello, I have been stuck on an SQL statement I have to write for class for extra credit. I have been trying to figure it out for literally hours. If anyone could take a look at what I have so far and could give me some clues it would be much appreciated.

The question is:
"Find the names of the projects whose participants earn exactly the same amount as their project leader."

Here is my SQL so far:
SELECT P.Name
FROM Employee as E, Project as P, WorksOn as W
WHERE P.Leader = E.eID AND W.Emp = E.eID AND W.ProjID = P.pID
GROUP BY P.Name

***I can't figure out how to code the part where you figure out if employees and leaders have the same salary!****

Here is the Relational Schema:
Employee (eID, Name, Age, Address, Salary, Manager)
Manager is a foreign key, it refers to Employee (eID)
Project (pID, Name, Location, SecurityLevel, Leader)
Leader is a foreign key, it refers to Employee (eID)
Supervises(Supervisor, Supervisee, StartDate)
Supervisor is a foreign key, it refers to Employee (eID)
Supervisee is a foreign key, it refers to Employee (eID)
WorksOn (Emp, ProjID, StartDate)
Emp is a foreign key, it refers to Employee (eID)
ProjID is a foreign key, it refers to Project(pID)


Report Offensive Message For Removal





Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Please help me with this SQL code

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




VGA Card in 386 clone - dip-switche

Video/Graphics problem

Ping on DOS 6.22

netgear, onelevel

Ping on DOS 6.22


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC