Guest User

Untitled

a guest
Jul 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. employee {e_id_pk, e_name}
  2. loc_emp {loc_e_id_pk, e_id_fk, t_id_fk}
  3. location {loc_id_pk, loc_direction}
  4. trip {tr_id_pk, e_id_fk, tran_id_fk, tr_desc}
  5. transport {tran_id_pk, tran_desc}
  6.  
  7. SELECT
  8. employee_id, fullname, passport, phone, position, direction, title,
  9. trip_code
  10. FROM
  11. t_facility
  12. INNER JOIN t_employee_facility USING (facility_id)
  13. INNER JOIN t_employee USING (employee_id)
  14. INNER JOIN t_trip USING (employee_id)
  15. GROUP BY
  16. employee_id,
  17. facility_id,
  18. trip_code
Add Comment
Please, Sign In to add comment