Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT e.first_name||' '||e.last_name, d.department_name, c.country_name
- FROM countries c, departments d, locations l, employees e
- WHERE c.country_id=l.country_id
- AND d.location_id=l.location_id
- AND e.department_id=d.department_id
- --and (select country_name from countries where country_name = 'United States of America'
- --union all
- --select department_name from departments where department_name in ('IT', 'Accounting'))
- AND country_name LIKE ('United States of America')
- AND department_name IN ('IT', 'Accounting')
- ORDER BY d.department_name, e.first_name;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement