source: database/Advanced Database Developement/Views/Complete overview of customer orders.txt@ 33517cc

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

Project Handcraft Marketplace

  • Property mode set to 100644
File size: 522 bytes
RevLine 
[62b2964]1CREATE OR REPLACE VIEW vw_customer_order_overview AS
2SELECT
3 o.order_num,
4 o.quantity,
5 o.status,
6 o.last_modified_date,
7 o.payment_method,
8 o.discount,
9 c.client_id,
10 c.first_name,
11 c.last_name,
12 c.email,
13 p.code AS product_code,
14 p.description AS product_description,
15 p.price FROM "order" o
16JOIN makes_order mo
17 ON mo.order_num = o.order_num
18JOIN client c
19 ON c.client_id = mo.client_id
20JOIN includes i
21 ON i.order_num = o.order_num
22JOIN product p
23 ON p.code = i.code;
Note: See TracBrowser for help on using the repository browser.