Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. select location_id, street_address, city, state_province, COUNTRY_NAME
  3. from locations
  4. natural join COUNTRIES;
  5.  
  6.  
  7. select last_name, department_id, department_name
  8. from employees
  9. natural join departments;
  10.  
  11.  
  12.  
  13. select e.last_name, e.job_id, d.department_id, d.department_name
  14. from employees e
  15. join departments d
  16. on(e.department_id = d.department_id)
  17. join locations l
  18. on(l.location_id = d.location_id)
  19. where l.city='Toronto';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement