Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2008
    Location
    Currently studying in France but not French ;)
    Posts
    11

    Post Unanswered: BASIC SQL command question

    Hi all,
    if anyone can help me find this out, I appreciate it

    I have 2 tables Employee(id,name,job,manager,startDate,salary,comm ,deptNo) and Dept(deptNo, deptName, location)

    I need to find out the salaries of the department who is gaining more money than the manager of that same department.

    can anyone help plz?

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    What have you tried so far?

  3. #3
    Join Date
    Nov 2008
    Location
    Currently studying in France but not French ;)
    Posts
    11
    I'm kind of stuck actually

  4. #4
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    You need to break this down.

    Step 1) find the manager for each department
    Step 2) find the max() salary for the employees of that department.
    Step 3) combine the two statements using a subselect

    Edit: while looking at the table definitions: that looks very much like the HR schema from the Oracle sample database.
    When I look at the table definitions (and the sample Oracle data), there is no such thing as a "manager of a department", so how do you define the "manager of the department"?
    Last edited by shammat; 11-18-08 at 16:06.

  5. #5
    Join Date
    Nov 2008
    Location
    Currently studying in France but not French ;)
    Posts
    11
    I found the answer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •