These are chat archives for eysteinn13/FraunhoferDBWebsite

26th
Jun 2015
Freyr12
@Freyr12
Jun 26 2015 20:50

SELECT SUM(ROUND(l.price * l.quantity, 2)), COUNT(p.po_ID)
FROM coating c, pos p, run r, lineitem l, lineitem_run lir, pos_run pru
WHERE c.coating_ID = r.coating_ID
AND r.run_ID = lir.run_ID
AND lir.lineitem_ID = l.lineitem_ID
AND l.po_ID = p.po_ID
AND pru.po_ID = p.po_ID
AND r.run_ID = pru.run_ID
AND p.po_ID NOT IN (SELECT po_ID
FROM pos
WHERE shipping_date IS NULL);

SELECT COUNT(*)
FROM pos;