Changes between Version 13 and Version 14 of AdvancedReports


Ignore:
Timestamp:
02/28/23 13:30:16 (21 months ago)
Author:
201065
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v13 v14  
    66(select a.articlename from project.articles a
    77    left join project.invoicedarticles i2 on i2.articleid=a.articleid
    8     where i2.price*i2.quantity=max(ba.totalPrice)
     8    where i2.price*i2.quantity=max(ba.totalPrice) and i2.invoiceid = min(ti.invoiceid)
    99    limit 1) as topArticleName,
    1010(select i2.price  from project.articles a
    1111    left join project.invoicedarticles i2 on i2.articleid=a.articleid
    12     where i2.price*i2.quantity=max(ba.totalPrice)
     12    where i2.price*i2.quantity=max(ba.totalPrice) and i2.invoiceid = min(ti.invoiceid)
    1313    limit 1) as topArticlePrice,
    1414(select i2.quantity from project.articles a
    1515    left join project.invoicedarticles i2 on i2.articleid=a.articleid
    16     where i2.price*i2.quantity=max(ba.totalPrice)
     16    where i2.price*i2.quantity=max(ba.totalPrice) and i2.invoiceid = min(ti.invoiceid)
    1717    limit 1) as topArticleQuantity,
    1818max(ba.totalPrice) as topArticleTotalPrice from project.workers w