Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2012
    Posts
    3

    Unanswered: Can anyone tell me what is wrong with

    Can anyone tell me what the heck is wrong with this query Im racking my brains over it,.........

    Select employee_id, first_name,
    From employees;
    Where salary =
    Select MIN (salary),
    From employees
    Group by department_id;

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    you have a boatload of extra & extraneous punctuation.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2012
    Posts
    3

    Anyone

    Anyone else

    Can be more specific?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Code:
    SELECT employee_id, 
           first_name 
    FROM   employees 
    WHERE  salary = (SELECT MIN (salary) 
                     FROM   employees 
                     GROUP  BY department_id);
    Why so ungrateful?
    Last edited by anacedent; 05-01-12 at 00:25.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Apr 2012
    Posts
    3
    Oh please dont understand I am grateful for the help I just needed a clearer explanation Thank you for the help. Im just starting out Im sure there will be other questions again thank you

  6. #6
    Join Date
    Apr 2012
    Posts
    7
    please remove unnecessary , and ;

    Basic structure is
    select col1,...,coln
    from tbl_name
    where col_name=(query)

Posting Permissions

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