Advertisement
gsemmobile

HR 11

May 23rd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.37 KB | None | 0 0
  1. --select emp.employee_id, last_name, salary, emp.job_id job_now, jobs.job_id job_before, rownum
  2. SELECT last_name, salary
  3. FROM employees emp, job_history jobs
  4. WHERE emp.employee_id = jobs.employee_id
  5. AND months_between(sysdate,hire_date)>120
  6. AND UPPER(emp.job_id) NOT LIKE UPPER('%IT%')
  7. AND UPPER(jobs.job_id) LIKE UPPER('%IT%')  
  8. AND rownum <= 3
  9. ORDER BY salary DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement