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:
625 bytes
|
| Line | |
|---|
| 1 | CREATE OR REPLACE VIEW vw_customer_request_response AS
|
|---|
| 2 | SELECT
|
|---|
| 3 | r.request_num,
|
|---|
| 4 | r.date_and_time,
|
|---|
| 5 | r.problem,
|
|---|
| 6 | r.notes_of_communication,
|
|---|
| 7 | r.customer_satisfaction,
|
|---|
| 8 |
|
|---|
| 9 | c.client_id,
|
|---|
| 10 | c.first_name AS client_first_name,
|
|---|
| 11 | c.last_name AS client_last_name,
|
|---|
| 12 | c.email AS client_email,
|
|---|
| 13 |
|
|---|
| 14 | p.id AS employee_id,
|
|---|
| 15 | p.first_name AS employee_first_name,
|
|---|
| 16 | p.last_name AS employee_last_name
|
|---|
| 17 |
|
|---|
| 18 | FROM request r
|
|---|
| 19 | JOIN make_request mr
|
|---|
| 20 | ON mr.request_num = r.request_num
|
|---|
| 21 | JOIN client c
|
|---|
| 22 | ON c.client_id = mr.client_id
|
|---|
| 23 | LEFT JOIN answers a
|
|---|
| 24 | ON a.request_num = r.request_num
|
|---|
| 25 | LEFT JOIN personal p
|
|---|
| 26 | ON p.id = a.id;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.