Changes between Version 8 and Version 9 of AdvancedReports


Ignore:
Timestamp:
12/27/22 21:23:33 (2 years ago)
Author:
201065
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v8 v9  
    113113{{{#!sql
    114114select s.supplierinfo, u.firstname, u.lastname, u.username, coalesce(sum(o2.quantity), 0) as koldostavena, coalesce(sum(o2.quantity*o2.price)) as zarabotkasupp from suppliers s
    115                 left join users u on u.userid=s.userid
    116                 left join orders o on o.supplieruserid=s.userid and (o.status='Delivered' or o.status='Processed')
    117                 left join orderedarticles o2 on o2.orderid=o.orderid and (o2.articlestatus='Delivered' or o2.articlestatus='Processed')
    118                 group by s.userid, u.userid
    119                 order by zarabotkasupp desc
     115        left join users u on u.userid=s.userid
     116        left join orders o on o.supplieruserid=s.userid and (o.status='Delivered' or o.status='Processed')
     117        left join orderedarticles o2 on o2.orderid=o.orderid and (o2.articlestatus='Delivered' or o2.articlestatus='Processed')
     118        group by s.userid, u.userid
     119        order by zarabotkasupp desc
    120120}}}
    121121