Changes between Version 8 and Version 9 of AdvancedReports
- Timestamp:
- 02/04/24 18:38:07 (8 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdvancedReports
v8 v9 6 6 count(order_table.order_id), 7 7 product.product_name 8 from order_table 9 left join order_table_contains_product on order_table_contains_product.order_id = order_table.order_id 10 left join product on product.product_id = order_table_contains_product.product_id 11 where order_table.order_status = 'Delivered' 8 from 9 order_table 10 left join order_table_contains_product on order_table_contains_product.order_id = order_table.order_id 11 left join product on product.product_id = order_table_contains_product.product_id 12 where 13 order_table.order_status = 'Delivered' 12 14 and order_table.order_date between now() - interval '3 months' and now() 13 group by product.product_name 15 group by 16 product.product_name 14 17 }}} 15 18 … … 102 105 join category on category.category_id = product_is_in_category.product_id 103 106 }}} 107 108 === Извештај за сите доставувачи кои доставиле продукти, бројот на продукти кои ги доставиле и нивната вкупна вредност 109 110 {{{ 111 select 112 user_table.name_user, 113 count(delivery.delivery_id), 114 sum(product.product_price) 115 from 116 user_table 117 join delivery_man on delivery_man.user_id = user_table.user_id 118 join delivery on delivery.delivery_man_id = delivery_man.user_id 119 join order_table on order_table.order_id = delivery.order_id 120 join order_table_contains_product on order_table_contains_product.order_id = order_table.order_id 121 join product on product.product_id = order_table_contains_product.product_id 122 where 123 order_table.order_status = 'Delivered' 124 group by 125 user_table.name_user 126 }}}