Index: database/Advanced Database Developement/Views/Complete overview of customer orders.txt
===================================================================
--- database/Advanced Database Developement/Views/Complete overview of customer orders.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Complete overview of customer orders.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,23 @@
+CREATE OR REPLACE VIEW vw_customer_order_overview AS
+SELECT
+    o.order_num,
+    o.quantity,
+    o.status,
+    o.last_modified_date,
+    o.payment_method,
+    o.discount,
+    c.client_id,
+    c.first_name,
+    c.last_name,
+    c.email,
+    p.code AS product_code,
+    p.description AS product_description,
+    p.price FROM "order" o
+JOIN makes_order mo
+    ON mo.order_num = o.order_num
+JOIN client c
+    ON c.client_id = mo.client_id
+JOIN includes i
+    ON i.order_num = o.order_num
+JOIN product p
+    ON p.code = i.code;
Index: database/Advanced Database Developement/Views/Complete overview of products and stores.txt
===================================================================
--- database/Advanced Database Developement/Views/Complete overview of products and stores.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Complete overview of products and stores.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,19 @@
+CREATE OR REPLACE VIEW vw_product_store_overview AS
+SELECT
+    p.code AS product_code,
+    p.description,
+    p.price,
+    p.availability,
+    p.weight,
+    p.approx_production_time,
+    s.store_id,
+    s.name AS store_name,
+    s.physical_address,
+    s.rating,
+    sl.quantity,
+    sl.discount
+FROM product p
+JOIN sells sl
+    ON sl.code = p.code
+JOIN store s
+   ON s.store_id = sl.store_id;
Index: database/Advanced Database Developement/Views/Customer order history.txt
===================================================================
--- database/Advanced Database Developement/Views/Customer order history.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Customer order history.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,27 @@
+CREATE OR REPLACE VIEW vw_customer_order_history AS
+SELECT
+    c.client_id,
+    c.first_name,
+    c.last_name,
+    c.email,
+
+    o.order_num,
+    o.quantity,
+    o.status,
+    o.last_modified_date,
+    o.payment_method,
+    o.discount,
+
+    p.code AS product_code,
+    p.description AS product_description,
+    p.price
+
+FROM client c
+JOIN makes_order mo
+    ON mo.client_id = c.client_id
+JOIN "order" o
+    ON o.order_num = mo.order_num
+JOIN includes i
+    ON i.order_num = o.order_num
+JOIN product p
+    ON p.code = i.code;
Index: database/Advanced Database Developement/Views/Customer request and response overview.txt
===================================================================
--- database/Advanced Database Developement/Views/Customer request and response overview.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Customer request and response overview.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,26 @@
+CREATE OR REPLACE VIEW vw_customer_request_response AS
+SELECT
+    r.request_num,
+    r.date_and_time,
+    r.problem,
+    r.notes_of_communication,
+    r.customer_satisfaction,
+
+    c.client_id,
+    c.first_name AS client_first_name,
+    c.last_name AS client_last_name,
+    c.email AS client_email,
+
+    p.id AS employee_id,
+    p.first_name AS employee_first_name,
+    p.last_name AS employee_last_name
+
+FROM request r
+JOIN make_request mr
+    ON mr.request_num = r.request_num
+JOIN client c
+    ON c.client_id = mr.client_id
+LEFT JOIN answers a
+    ON a.request_num = r.request_num
+LEFT JOIN personal p
+    ON p.id = a.id;
Index: database/Advanced Database Developement/Views/Employee workload and salary report.txt
===================================================================
--- database/Advanced Database Developement/Views/Employee workload and salary report.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Employee workload and salary report.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,27 @@
+CREATE OR REPLACE VIEW vw_employee_workload_salary AS
+SELECT
+    e.id AS employee_id,
+    p.first_name,
+    p.last_name,
+    p.email,
+    e.date_of_hire,
+
+    s.store_id,
+    s.name AS store_name,
+
+    w.week,
+    w.total_week,
+    w.working_hours,
+    w.wage,
+    w.pay_method
+
+FROM employees e
+JOIN personal p
+    ON p.id = e.id
+JOIN works_in_store wis
+    ON wis.id = e.id
+JOIN store s
+    ON s.store_id = wis.store_id
+LEFT JOIN worked w
+    ON w.id = e.id
+    AND w.store_id = wis.store_id;
Index: database/Advanced Database Developement/Views/Monthly sales and profit per store.txt
===================================================================
--- database/Advanced Database Developement/Views/Monthly sales and profit per store.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Monthly sales and profit per store.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,18 @@
+CREATE OR REPLACE VIEW vw_monthly_sales_profit AS
+SELECT
+    s.store_id,
+    s.name AS store_name,
+    r.date,
+    r.month_and_year,
+    r.profit,
+    r.overall_profit,
+    ed.monthly_profit,
+    ed.sales,
+    ed.damages
+
+FROM store s
+JOIN report r
+    ON r.store_id = s.store_id
+LEFT JOIN exchanges_data ed
+    ON ed.store_id = r.store_id
+    AND ed.date = r.date;
Index: database/Advanced Database Developement/Views/Store inventory overview.txt
===================================================================
--- database/Advanced Database Developement/Views/Store inventory overview.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Store inventory overview.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,19 @@
+CREATE OR REPLACE VIEW vw_store_inventory AS
+SELECT
+    s.store_id,
+    s.name AS store_name,
+
+    p.code AS product_code,
+    p.description,
+    p.price,
+    p.availability,
+    p.approx_production_time,
+
+    sl.quantity,
+    sl.discount
+
+FROM store s
+JOIN sells sl
+    ON sl.store_id = s.store_id
+JOIN product p
+    ON p.code = sl.code;
Index: database/Advanced Database Developement/Views/Store performance overview.txt
===================================================================
--- database/Advanced Database Developement/Views/Store performance overview.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
+++ database/Advanced Database Developement/Views/Store performance overview.txt	(revision 62b296460f935ff5cc47a75f6567f97df5a244a7)
@@ -0,0 +1,27 @@
+CREATE OR REPLACE VIEW vw_store_performance AS
+SELECT
+    s.store_id,
+    s.name AS store_name,
+    s.date_of_founding,
+    s.rating,
+
+    COUNT(DISTINCT r.date) AS number_of_reports,
+    COALESCE(SUM(r.profit), 0) AS total_reported_profit,
+    COALESCE(MAX(r.overall_profit), 0) AS overall_profit,
+
+    COALESCE(SUM(ed.sales), 0) AS total_sales,
+    COALESCE(SUM(ed.damages), 0) AS total_damages,
+    COALESCE(SUM(ed.monthly_profit), 0) AS total_monthly_profit
+
+FROM store s
+LEFT JOIN report r
+    ON r.store_id = s.store_id
+LEFT JOIN exchanges_data ed
+    ON ed.store_id = r.store_id
+    AND ed.date = r.date
+
+GROUP BY
+    s.store_id,
+    s.name,
+    s.date_of_founding,
+    s.rating;
