Changes between Version 5 and Version 6 of AdvancedReports


Ignore:
Timestamp:
12/28/22 12:43:24 (2 years ago)
Author:
201084
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v5 v6  
    155155
    156156}}}
     157=== Извештај за деловите кои биле нарачани во последните 3 месеци, со нивни категории и производители и количината која била нарачана ===
     158{{{#!sql
     159select p.id_part, p.part_name, cat.category_name, pm.pm_name,
     160       sum(ocp.quantity_order) as narachani_posledni_3_meseci
     161from project.part as p
     162join project.part_manufacturer as pm on p.id_part_manufacturer = pm.id_part_manufacturer
     163join project.part_is_from_category as pifc on p.id_part = pifc.id_part
     164join project.category as cat on pifc.id_category = cat.id_category
     165join project.order_contains_part as ocp on p.id_part = ocp.id_part
     166join project.order_table as o on ocp.id_order = o.id_order
     167                                  and
     168                              o.order_date between now()-interval'3 months' and now()
     169group by p.id_part, p.part_name, cat.category_name, pm.pm_name
     170}}}