source: database/Advanced Database Developement/Views/Monthly sales and profit per store.txt@ 6c7cfa6

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

Project Handcraft Marketplace

  • Property mode set to 100644
File size: 366 bytes
Line 
1CREATE OR REPLACE VIEW vw_monthly_sales_profit AS
2SELECT
3 s.store_id,
4 s.name AS store_name,
5 r.date,
6 r.month_and_year,
7 r.profit,
8 r.overall_profit,
9 ed.monthly_profit,
10 ed.sales,
11 ed.damages
12
13FROM store s
14JOIN report r
15 ON r.store_id = s.store_id
16LEFT JOIN exchanges_data ed
17 ON ed.store_id = r.store_id
18 AND ed.date = r.date;
Note: See TracBrowser for help on using the repository browser.