Changes between Version 8 and Version 9 of AdvancedReports


Ignore:
Timestamp:
02/04/24 18:38:07 (8 months ago)
Author:
201171
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v8 v9  
    66    count(order_table.order_id),
    77    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'
     8from
     9    order_table
     10left join order_table_contains_product on order_table_contains_product.order_id = order_table.order_id
     11left join product on product.product_id  = order_table_contains_product.product_id
     12where
     13    order_table.order_status = 'Delivered'
    1214    and order_table.order_date between  now() - interval '3 months' and now()
    13 group by product.product_name
     15group by
     16    product.product_name
    1417}}}
    1518
     
    102105join category on category.category_id = product_is_in_category.product_id
    103106}}}
     107
     108=== Извештај за сите доставувачи кои доставиле продукти, бројот на продукти кои ги доставиле и нивната вкупна вредност
     109
     110{{{
     111select
     112    user_table.name_user,
     113    count(delivery.delivery_id),
     114    sum(product.product_price)
     115from
     116    user_table
     117join delivery_man on delivery_man.user_id = user_table.user_id
     118join delivery on delivery.delivery_man_id = delivery_man.user_id
     119join order_table on order_table.order_id = delivery.order_id
     120join order_table_contains_product on order_table_contains_product.order_id = order_table.order_id
     121join product on product.product_id = order_table_contains_product.product_id
     122where
     123    order_table.order_status = 'Delivered'
     124group by
     125    user_table.name_user
     126}}}