finki-main
main
|
Last change
on this file since 06ebe74 was 62b2964, checked in by Klimentina Efremova <klimentina08642@…>, 2 weeks ago |
|
Project Handcraft Marketplace
|
-
Property mode
set to
100644
|
|
File size:
495 bytes
|
| Line | |
|---|
| 1 | CREATE OR REPLACE VIEW vw_employee_workload_salary AS
|
|---|
| 2 | SELECT
|
|---|
| 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 |
|
|---|
| 18 | FROM employees e
|
|---|
| 19 | JOIN personal p
|
|---|
| 20 | ON p.id = e.id
|
|---|
| 21 | JOIN works_in_store wis
|
|---|
| 22 | ON wis.id = e.id
|
|---|
| 23 | JOIN store s
|
|---|
| 24 | ON s.store_id = wis.store_id
|
|---|
| 25 | LEFT 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.