chris-at-github
11/15/2014 - 10:28 AM

Bestellungen auslesen

Bestellungen auslesen

SELECT o.OXORDERDATE, oa.OXARTNUM, oa.OXTITLE, oa.OXSELVARIANT, oa.OXNETPRICE, oa.OXAMOUNT
FROM oxorder AS o
LEFT JOIN oxorderarticles AS oa ON o.OXID = oa.OXORDERID
ORDER BY o.OXORDERDATE

SELECT oa.OXARTNUM, oa.OXTITLE, oa.OXSELVARIANT, oa.OXNETPRICE, COUNT(oa.OXAMOUNT) AS OXAMOUNT, SUM(oa.OXNETPRICE) AS OXNETPRICETOTAL
FROM oxorderarticles AS oa
GROUP BY oa.OXARTID
ORDER BY oa.OXARTNUM