source: database/Advanced Database Developement/Views/Customer request and response overview.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: 625 bytes
RevLine 
[62b2964]1CREATE OR REPLACE VIEW vw_customer_request_response AS
2SELECT
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
18FROM request r
19JOIN make_request mr
20 ON mr.request_num = r.request_num
21JOIN client c
22 ON c.client_id = mr.client_id
23LEFT JOIN answers a
24 ON a.request_num = r.request_num
25LEFT JOIN personal p
26 ON p.id = a.id;
Note: See TracBrowser for help on using the repository browser.