Results 1 to 2 of 2

Thread: Evaluate SQL statement

  1. #1
    Geek_Guest
    Guest

    Evaluate SQL statement

    Examine the data of the EMPLOYEES table.
    EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to
    the EMPLOYEE_ID)
    EMPLOYEE_ID EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY
    101 Smith 20 120 SA_REP 4000
    102 Martin 10 105 CLERK 2500
    103 Chris 20 120 IT_ADMIN 4200
    104 John 30 108 HR_CLERK 2500
    105 Diana 30 108 HR_MGR 5000
    106 Bryan 40 110 AD_ASST 3000
    108 Jennifer 30 110 HR_DIR 6500
    110 Bob 40 EX_DIR 8000
    120 Ravi 20 110 SA_DIR 6500
    Evaluate this SQL statement:
    SELECT e.employee_id "Emp_id", e.emp_name "Employee",
    e.salary, m.employee_id "Mgr_id", m.emp_name "Manager"
    FROM employees e, employees m
    WHERE e.mgr_id = m.employee_id
    AND e.salary > 4000;

    Question asked by visitor caniut


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Evaluate SQL statement

    What is your question ?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact