Changes between Version 6 and Version 7 of AdvancedReports
- Timestamp:
- 01/10/24 10:27:23 (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdvancedReports
v6 v7 56 56 limit 1; 57 57 }}} 58 == Прикажување на продукти кои што би можело да се потрошат најбрзо бидејќи има побарано најголема количина за нив. 59 {{{ 60 SELECT 61 p.name AS product_name, 62 p.description AS product_description, 63 AVG(o.quantity) AS avg_sales_quantity 64 FROM 65 project.products p 66 JOIN 67 project.product_are_made_orders po ON p.ID = po.id_products 68 JOIN 69 project.orders o ON po.id_orders = o.ID 70 GROUP BY 71 p.ID 72 ORDER BY 73 avg_sales_quantity DESC; 74 }}}