Home » SQL & PL/SQL » SQL & PL/SQL » Help With 5 Questions
Help With 5 Questions [message #3055] Mon, 02 September 2002 20:13 Go to next message
kb2010
Messages: 2
Registered: September 2002
Junior Member
hi i am reletively new to db and am trying to learn of the net :) but i cant do some tutorial questions :(

i have the following DB

EMPLOYEE(EmployeeID, Lname, Fname, PositionId, Supervisor, HireDate,
Salary, Commission, DeptID, QualId)
DEPT(DeptId, DeptName, Location, EmployeeID)
POSITION(PositionId, PosDesc)
SALARYLEVEL(LevelNo, LowerLimit, UpperLimit)
QUALIFICATION(QualId, QualDesc)
DEPENDENT(EmployeeId, DependentId, DepDOB, Relation)

how would i do the following?

1. List employees who practice polygamy according to this database. List them
under the column headings: NAME and NUMBER OF SPOUSES.

2. Make a list of employees who have not declared their dependents. Use set
difference for this purpose. It should show the EmployeeID and First Name of
such employees; the column headings being EMPLOYEEID and FNAME.

3. Calculate total salary paid to different categories of employees (positions held
by the employees). The view should consist of three columns called
POSITIONID, POSDESC and TOTAL SALARY.

4. List employee pairs where the first employee has higher qualification but
receives less salary (ignore the commission) from the second employee. List
the first name, qualification and salary for each employee. We assume that
unreported salary/commission means no salary/commission. The headings
should be: LOW_EMP, LOW_QUAL, LOW_SAL, HIGH_EMP,
HIGH_QUAL, HIGH_SAL. Do not use any sub-query.

5. Make a list of dependents (of employees) whose birthday falls in the next
calendar month (so that birthday wishes can be sent to them.) List Employee
ID, name, relation to the dependent and the dependent’s date and month of
birth. The list should be ordered according to the date. You must use the
system date in order to identify the next month, not hard-code it.
Re: Help With 5 Questions [message #3072 is a reply to message #3055] Tue, 03 September 2002 03:21 Go to previous messageGo to next message
Mark
Messages: 284
Registered: July 1998
Senior Member
This sounds like an education project. Sorry to be a pain, but the best way to learn is to investigate rather than be given the answers. There's loads of info available on the net. Why not try http://fluffycat.com/sql/ as a starting point?
Re: Help With 5 Questions [message #3077 is a reply to message #3055] Tue, 03 September 2002 05:15 Go to previous message
kb2010
Messages: 2
Registered: September 2002
Junior Member
i have done Q 1 to 3 i am stuck on 4 i have a slight idea on 5

no its not an educational project..project are usually bigger..

these are tute aka prac question...
Previous Topic: a simple question
Next Topic: Alter SYS & SYSTEM user on any database
Goto Forum:
  


Current Time: Thu Apr 18 20:44:14 CDT 2024