source: database/Advanced Database Developement/Views/Store inventory overview.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: 338 bytes
Line 
1CREATE OR REPLACE VIEW vw_store_inventory AS
2SELECT
3 s.store_id,
4 s.name AS store_name,
5
6 p.code AS product_code,
7 p.description,
8 p.price,
9 p.availability,
10 p.approx_production_time,
11
12 sl.quantity,
13 sl.discount
14
15FROM store s
16JOIN sells sl
17 ON sl.store_id = s.store_id
18JOIN product p
19 ON p.code = sl.code;
Note: See TracBrowser for help on using the repository browser.