Advertisement
DimitarVasilev

Untitled

May 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.56 KB | None | 0 0
  1. SELECT e.first_name||' '||e.last_name, d.department_name, c.country_name
  2. FROM countries c, departments d,  locations l, employees e
  3. WHERE c.country_id=l.country_id
  4. AND d.location_id=l.location_id
  5. AND e.department_id=d.department_id
  6. --and (select country_name from countries where country_name = 'United States of America'
  7. --union all
  8. --select department_name from departments where department_name in ('IT', 'Accounting'))
  9. AND country_name LIKE ('United States of America')
  10. AND department_name IN ('IT', 'Accounting')
  11. ORDER BY d.department_name, e.first_name;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement