source: database/Advanced Database Developement/Views/Employee workload and salary report.txt@ 62b2964

finki-main main
Last change on this file since 62b2964 was 62b2964, checked in by Klimentina Efremova <klimentina08642@…>, 2 weeks ago

Project Handcraft Marketplace

  • Property mode set to 100644
File size: 495 bytes
RevLine 
[62b2964]1CREATE OR REPLACE VIEW vw_employee_workload_salary AS
2SELECT
3 e.id AS employee_id,
4 p.first_name,
5 p.last_name,
6 p.email,
7 e.date_of_hire,
8
9 s.store_id,
10 s.name AS store_name,
11
12 w.week,
13 w.total_week,
14 w.working_hours,
15 w.wage,
16 w.pay_method
17
18FROM employees e
19JOIN personal p
20 ON p.id = e.id
21JOIN works_in_store wis
22 ON wis.id = e.id
23JOIN store s
24 ON s.store_id = wis.store_id
25LEFT JOIN worked w
26 ON w.id = e.id
27 AND w.store_id = wis.store_id;
Note: See TracBrowser for help on using the repository browser.